The steps I posted earlier give you a running copy of Leo, and access to 
some to Leo's objects in Pyzo's Workspace pane, but the interactive shell 
pane doesn't accept input.  I suppose it's waiting for Leo to terminate.  I 
have found a simpler set of steps that launch Leo, let you see many more 
Leo objects in the Workspace, and also interact with the running Leo in 
Pyzo's interactive pane.  This is probably exactly what Matt was 
explaining, but somehow I didn't quite understand something about it.  So 
I'd like to write it down here.

1.  First of all, create a shell configuration in Pyzo, but don't have it 
run Leo as I described earlier.  Instead, pick or type in the path to the 
Python interpreter you want to use, and don't give it an argument or 
initial script. Give the configuration a name and save it.  I called mine 
"Bare Python".

2.  Next, in the editor pane (usually on the left), type these two lines:

import leo
leo.run()

3.  Start the shell you created using Pyzo's Shell menu.

4. Now press <CTRL>-<ENTER>.  Or you can use the Run/Execute Cell menu 
item.  This will launch Leo (though without docks) *and* you will be able 
to interact with it in Pyzo's interactive shell pane (normally in the upper 
right).  Every Leo object and attribute you could want will be available in 
the Workspace pane.  

For example, in the workspace, double click on leo, then scroll down and 
double click on plugins.  You will see all the plugins Leo is using.  
Double click on one of them and you will see its objects and attributes.

In the interactive pane, just by way of example, type leo.  On my computer, 
I got this:

<module 'leo' from 
'c:\\users\\tom\\appdata\\local\\programs\\python\\python38\\lib\\site-packages\\leo\\__init__.py'>

In other words, just what you would expect from a Python interactive 
session.

This is really nice.

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/leo-editor/55e28a9a-340f-46c9-92f3-5a6511a359ce%40googlegroups.com.

Reply via email to