[wxPython-users] Pallavi 0.5: Text editor utilizing wxPython

Rob McMullen rob.mcmullen at gmail.com
Tue Sep 4 14:44:18 PDT 2007


> As such, I think I may download Peppy and see what I think.

You might try the latest svn, as I've been refactoring for the last
month or so but haven't made a release yet because I'm waiting to
finish a few polishes.  But, the latest svn has a much better (er,
well, *better*, at least) architecture of the file opening process.
I'm still using urllib2 for its extensibility and the support of
multiple protocols (http, ftp, file, etc.), but the flow of control is
more straight-forward.

svn co http://svn.flipturn.org/peppy/trunk peppy

As you noted, it is a bit over-engineered were it only a text editor,
but in order to support some features, I had to expand a bit.  The big
craziness is multiple views and the corresponding features in the
Buffer class -- it uses an STC as the datastore so that the view can
be another STC that is linked to it using the
AddRefDocument/SetDocPointer methods *or* it can be a totally separate
viewer (ala HexEditMode) that looks at the STC data in the form of a
wx.Grid.  Also, I tried to be clever about the menubar/toolbar support
-- each mode can have unique menu/toolbars so they get rebuilt
constantly when switching modes.  I also used a constraint solver to
position the items, rather than explicitly coding up a bunch of
wx.Menu item calls. It works, but the code is still too complicated
and convoluted.

Maybe we can move over to the pyxides list to talk about plugins,
because I'm interested to hear about what jedit does and your design
thoughts about it in python.

Rob




More information about the wxpython-users mailing list