Thanks for the detailed reply! It was quite helpful. I think I'm finally over the initial 'what on earth is going on' hump--I ended up running things from Eclipse, which seems to be working out fine, and have managed to create a 'hello world' type plugin derived from a simplified version of the pylint plugin. However, the --new-instance flag is a very useful bit of information: thanks!
And the shortcut caching in .spyder2/ was indeed the problem--removing the out-of-date entries let the new ones take effect. I'm not sure if this counts as a flaw in Spyder itself--should I open an issue about it? My only other question would be: would there have been a good way to discover the information you posted on my own? I assume as I get more proficient at this, looking at the code itself will be more revealing, but if there's a part of the code that would be helpful for me to look at first, or if there are other flags like the '--help' flag that would give any insight into the basics of what's going on, that'd be great. Thanks again! -Lucian On Mon, Aug 26, 2013 at 1:35 PM, Carlos Córdoba <[email protected]>wrote: > Hi Lucian, > > Sorry for my very late answer. My comments and suggestions are below: > > El 15/08/13 18:10, Lucian Smith escribió: > >> I am trying to get started on writing a plugin or two for Spyder, and >> I have a few questions. First, I see by searching around that others >> have been interested in a 'hello world' type plugin example for Spyder >> in the past, but nobody ever seems to actually have a working copy of >> one. Do any of you have one you put together? Barring that, the >> thing to do seems to be to copy and modify the pylint plugin, which >> can work, but starts off a bit complicated. Are there particular >> modules inside spyderlib/ that would also work as plugin examples, >> were they to be renamed and moved to the plugin directory? >> > > Perhaps easier than the pylint plugin is the breakpoints one > (p_breakpoints.py). Please take a look at it to start with a more > understandable plugin. > > Inside spyderlib, you can look at all files in the plugins directory. It > contains the plugins that form the core of Spyder, like the Editor, the > Console or the Object Inspector, so they are more complex and integrated > with one another (than pylint or breakpoints) but you could take some > inspiration from them too. > > Second, for anyone doing plugin development, how do you do your >> debugging? So far, I've been editing the plugin from within Spyder >> itself, then shutting it down and re-launching (from bootstrap.py). >> This works OK, but when something goes wrong, the diagnostics are >> minimal, and I lose my undo/redo history. And I can't run >> 'bootstrap.py' from another instance of Spyder, since this doesn't >> seem to do anything (presumably since it sees Spyder is already >> running). Do you just launch bootstrap.py from a different IDE >> altogether? Any recommendations? >> > > Yes, there is one important recommendation: use bootstrap.py with the > following option to open a second instance: > > python bootstrap.py -- --new-instance > > This is what we the developers use to test Spyder changes while developing > its code with Spyder itself. The -- in the middle is used to separate the > bootstrap.py options from the ones of Spyder itself. Please read > > python boostrap.py --help > > to see how this works. > > Without --new-instance, Spyder looks first for a running instance. If it > can find it and no file name is passed, then it just returns to the prompt > again. This is used by us to open python files on the same instance. > > Finally, I am running into a smallish issue, but due to #2 above, I >> can't figure out what the problem is. If I change this line in >> p_pylint.py: >> >> self.register_shortcut(pylint_**act, context="Pylint", name="Run >> analysis", default="F8") >> >> to: >> >> self.register_shortcut(pylint_**act, context="Pylint", name="Run >> analysis", default="Ctrl+F9") >> >> the shortcut will indeed change to F9. However, if I try other things >> like: >> >> self.register_shortcut(pylint_**act, context="Pylint", name="Run >> analysis", default="Ctrl+F8") >> >> And sometimes even changing it to F9 doesn't work, and it keeps the >> old F8. Is it caching the value somewhere? Is there a way I can step >> through what's going on? >> > > Yes, the shortcut values are catched in ~/.spyder2/.spyder.ini (look for > the "shortcuts" section at the end). > > Thank you! >> >> -Lucian >> >> > Please keep posting here if you have more doubts and don't get discouraged > by our current lack of availability, I'll try to be more responsive from > now on. The thing is I had I terrible cold last week and I was working with > Pierre (our main contributor) to release 2.2.3 too. > > Cheers, > Carlos > > -- > You received this message because you are subscribed to the Google Groups > "spyder" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to > spyderlib+unsubscribe@**googlegroups.com<spyderlib%[email protected]> > . > To post to this group, send email to [email protected]. > Visit this group at > http://groups.google.com/**group/spyderlib<http://groups.google.com/group/spyderlib> > . > For more options, visit > https://groups.google.com/**groups/opt_out<https://groups.google.com/groups/opt_out> > . > -- You received this message because you are subscribed to the Google Groups "spyder" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/spyderlib. For more options, visit https://groups.google.com/groups/opt_out.
