Oh, I also had to manually set the PyQt4 API to V2 in leoQt.py using the 
method found here 
<http://cyrille.rossant.net/making-pyqt4-pyside-and-ipython-work-together/>. 
It seems that Leo by default was import V1 and the RichIPythonWidget didn't 
like that at all.

On Tuesday, April 28, 2015 at 3:58:35 PM UTC-4, john lunzer wrote:
>
> Oh man, this is great. I've been toying around with a rudimentary plugin 
> to an interactive IPython console most adapted from this 
> <http://stackoverflow.com/questions/26666583/embedding-ipython-qtconsole-and-passing-objects>
>  answer.
>
> I haven't done much more than what you see, I haven't included g,c,p and 
> right now all ipython consoles share the same namespace. 
>
> I'd like to have Edward weigh in since he was planning on fixing a bug in 
> ILeo which possibly could be sidestepped by integrating IPython into Leo 
> rather than it being an external window.
>
> Awesome work Jacob, exciting times for Leo! With these types of plugins 
> Leo might appeal to some of the Spyder crowd (from which I came and had 
> been missing an integrated Python/IPython Console).
>
> On Tuesday, April 28, 2015 at 3:06:56 PM UTC-4, Jacob Peck wrote:
>>
>>  Hi all,
>>  
>> Rev d30c0993f8 includes a new plugin, python_terminal.py, that adds an 
>> interactive python session to your log pane.  Here's the docstring:
>>
>>  Leo.plugins.python_terminal 
>>
>> Provides an interactive python terminal in the log pane.
>>
>> By Jacob M. Peck
>>  Usage 
>>
>> Enabling this plugin will add a new tab to the Log pane, labeled “Python 
>> Console”. This is a fully interactive python command shell, with access to
>>  g, c, and p included!
>>
>> Features:
>>
>>
>>    - Includes support for g, c, and p 
>>    - Each outline tab has a separate python console, with a separate 
>>    namespace (aside from g, of course) 
>>    - Extremely primitive tab-completion 
>>    - Command history (use !hist to list, and !hist(n) to recall the n’th 
>>    entry) 
>>    - !clear to clear the console 
>>
>>  Caveats:
>>
>>
>>    - The console swallows stdout and stderr while focused, but properly 
>>    resets it to the default values when unfocused 
>>    - Just as with scripts, if you do something dangerous, you’re on your 
>>    own 
>>
>>  This code is largely lifted from 
>> http://stackoverflow.com/questions/12431555/enabling-code-completion-in-an-embedded-python-interpreter,
>>  
>> with some modifications made for Leo embedding.
>>  
>> ----
>>
>> I hope it comes in handy for those who wish to work with Leo in a 'live' 
>> capacity (as an alternative to livecode.py), or those who simply like to 
>> see a REPL while they're thinking about things :)  Or those who want a 
>> simple calculator... or something.
>>
>> Anyways, enjoy :)
>>
>> -->Jake
>>
>>  
>> 

-- 
You received this message because you are subscribed to the Google Groups 
"leo-editor" 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/leo-editor.
For more options, visit https://groups.google.com/d/optout.

Reply via email to