It's extremely rudimentary at the moment. I wanted to be sure a proof of 
concept would work. It doesn't have the bug because right because the 
console doesn't have the ability to receive and execute code from a node. 
It's just an IPython console that runs in a Leo pane, with zero connection 
between the two.

If that is good enough to just get out there and I get Edward's advice 
about how to deal with the PyQt4 API V1/V2 issue I was having. Forcing Leo 
to import V2 doesn't seem to break anything. Since Leo supports PyQt5 which 
only uses V2 I believe, then maybe it isn't an issue to force Leo to import 
V2. Maybe there can be a fallback condition if attempting to Load V2 fails. 

Within the next week or two I was hoping to study Spyder's IPython console 
and also Edward's ILeo code in order  to get more integrated.


On Tuesday, April 28, 2015 at 10:40:19 PM UTC-4, Peter Mills wrote:
>
> Wow.  I'll have to try both these plugins.  I too use Spyder and have 
> found it difficult to do without its console or some sort of external 
> console even when working within Leo.  These plugins within the Leo GUI 
> should make a huge difference for me.  
>
> John L, is the IPython console functional apart from the g,c,p omissions, 
> or does it need the ILeo bug fixed first?  Is the code available yet?
>
> On Wednesday, April 29, 2015 at 5:06:56 AM UTC+10, 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 leo-editor+unsubscr...@googlegroups.com.
To post to this group, send email to leo-editor@googlegroups.com.
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