Re: New plugin: python_terminal.py, adds an interactive python session to your log pane

2015-05-01 Thread Edward K. Ream
On Fri, May 1, 2015 at 5:01 PM, Edward K. Ream wrote: ​> ​ So I think the problem is in PyInterp. ​Rev ca8fd45 fixes the problem. PyInterp​.focusInEvent must call the base focusInEvent method in order for ensureCursorVisible to have effect. I prefer the following over calling super:: QtWi

Re: New plugin: python_terminal.py, adds an interactive python session to your log pane

2015-05-01 Thread Edward K. Ream
On Fri, May 1, 2015 at 8:29 AM, Edward K. Ream wrote: 2. It's off putting not to have a blinking cursor when the pane has focus. > ​It took awhile to track down that c.​idle_focus_helper is the code that checks for "missing" focus. However, the "active" switch isn't set, which means that c.idle

Re: New plugin: python_terminal.py, adds an interactive python session to your log pane

2015-05-01 Thread Jacob Peck
On 5/1/2015 9:29 AM, Edward K. Ream wrote: On Tuesday, April 28, 2015 at 2:06:56 PM UTC-5, Jacob Peck wrote: > Rev d30c0993f8 includes a new plugin, python_terminal.py, that adds an interactive python session to your log pane. This is very cool. A few comments: 1. The code is based on Pyt

Re: New plugin: python_terminal.py, adds an interactive python session to your log pane

2015-05-01 Thread Edward K. Ream
On Tuesday, April 28, 2015 at 2:06:56 PM UTC-5, Jacob Peck wrote: > Rev d30c0993f8 includes a new plugin, python_terminal.py, that adds an interactive python session to your log pane. This is very cool. A few comments: 1. The code is based on Python's code module in the standard library. The

Re: New plugin: python_terminal.py, adds an interactive python session to your log pane

2015-04-30 Thread Edward K. Ream
On Wed, Apr 29, 2015 at 4:53 AM, john lunzer wrote: > > If > ​...​ > 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 > is

Re: New plugin: python_terminal.py, adds an interactive python session to your log pane

2015-04-30 Thread john lunzer
It doesn't seem like Spyder is doing anything that Leo couldn't do. There may be a good reason that Spyder handles kernels externally, it might be the only reasonable way to get mulitple IPython kernels running. All of that said it's going to take me quite of bit of study of Leo and IPython to

Re: New plugin: python_terminal.py, adds an interactive python session to your log pane

2015-04-30 Thread Peter Mills
I've done a bit of looking at Spyder myself with similar ideas. However, Spyder's IPython console uses an external IPython kernel, so it would be impossible(?) to access Leo's innards using this technique. In fact, I haven't been able to find a way to have both the GUI of IPython QtConsole an

Re: New plugin: python_terminal.py, adds an interactive python session to your log pane

2015-04-29 Thread john lunzer
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 bet

Re: New plugin: python_terminal.py, adds an interactive python session to your log pane

2015-04-28 Thread Peter Mills
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 a

Re: New plugin: python_terminal.py, adds an interactive python session to your log pane

2015-04-28 Thread john lunzer
Oh, I also had to manually set the PyQt4 API to V2 in leoQt.py using the method found here . 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:

Re: New plugin: python_terminal.py, adds an interactive python session to your log pane

2015-04-28 Thread john lunzer
Oh man, this is great. I've been toying around with a rudimentary plugin to an interactive IPython console most adapted from this answer. I haven't done much more than what you see, I haven't included

New plugin: python_terminal.py, adds an interactive python session to your log pane

2015-04-28 Thread Jacob Peck
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