Leo + Python: the ultimate scripting tool: gui issues

Edward K. Ream edreamleo at charter.net
Mon Nov 10 16:19:00 EST 2003


Several responses mentioned gui issues, which have little to do with
scripting.  However, gui issues are near and dear to my heart, so I thought
I would summarize how things stand with Leo and guis:

1. Leo is in the midst of a global reorg that will separate gui-dependent
code from a gui-independent "core".  This is going well, and will be
completed in about a week.  This reorg is the basis for the 4.1 code base.
4.1 final is due out in December; there will be a lengthy period of testing
(including many new unit tests) while the code settles down.

A prototype plugin for Leo already exists that replaces Leo's default
Tk/tkinter gui with a wxPython gui.  The original version of the prototype
had to duplicate a large amount of Leo's core to be even partly functional.
With the new code base the wxPython gui only needs to know how to do generic
wxPython kinds of stuff.  All knowledge of Leo's core is handled by base
classes that are in Leo's core.

In another reply I misspoke: I said that anygui probably wasn't up to the
job.  In fact, with the new organization it would be dead easy to create a
plugin to support anygui instead of, say, wxPython.  Experimenting with
anygui would be virtually risk free: it would take an hour or so of time.
N.B.   Gui plugins are _completely_ responsible for handling all gui-related
events.  In particular, the interface between Leo's core and gui plugins
ignores event handling completely.  This greatly simplifies the interface
and ensures that no assumptions at all about event handling "infect" Leo's
core.  I was originally dubious about matching anygui's model of events.
Now I see the fear was unfounded.

2.  One of my hopes in writing the original series of postings was that
there would be some discussion of integrating Leo with Emacs using pymacs.
This may have started to happen.  I would really like help with this
project, and I'll support anyone working on such a project in any way I can.
I think running some kind of Leo window on Emacs would be totally cool.

3.  Several people have mentioned that it would be good to start up Leo in
scripting mode.  There are several easy ways to do this.  It will happen
eventually: don't know when.  Right now it seems more like a cute feature
than something vital...In any event, there will eventually be a way of
running Leo without any gui at all: a null-gui plugin probably could do this
with about 10 lines of code.

Edward
--------------------------------------------------------------------
Edward K. Ream   email:  edreamleo at charter.net
Leo: Literate Editor with Outlines
Leo: http://webpages.charter.net/edreamleo/front.html
--------------------------------------------------------------------






More information about the Python-list mailing list