Thanks a lots for your feedback and for the PR.

To be more specific, SpyderPluginMixins require a dock on first run only. 
Once spyder.ini is created, it runs fine even if the dock doesn't exist.

I don't usually use toolbars myself, but a SpyderActionPlugin is a great 
idea.

Joseph

Le dimanche 3 novembre 2013 04:53:03 UTC+1, Steven Silvester a écrit :
>
> Great work Joseph!   I tried out both programs on my Windows box and 
> offered a couple pull requests on Github.  
>
> There is one intractable problem: SpyderPluginMixins require a dock, and 
> autopep8 does not use one.  I was forced to create a dummy dockwidget to 
> get the plugin to work.
>
> I propose the following: create a SpyderActionPlugin that only adds 
> action(s) to toolbar(s), and does not maintain a widget.
>
> If you check out https://code.google.com/p/spyderlib-jedi/, in the extras 
> bookmark, my two latest commits contain the required changes, as well as an 
> example autopep8 SpyderActionPlugin.
>
> The relevant file changes were:  
> - Add SpyderActionPlugin class to spyderlib/plugins/__init__.py, based on 
> the SpyderPluginMixin template.
> - Add some guards in spyderlib/spyder.py to handle action-only plugins.
>
> On Thursday, August 15, 2013 6:10:18 PM UTC-5, Lucian Smith wrote:
>>
>> 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? 
>>
>> 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? 
>>
>> 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? 
>>
>> Thank you! 
>>
>> -Lucian 
>>
>

-- 
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.

Reply via email to