[wxPython-users] ANN: peppy-0.5.1, editor and software development process experiment

Josiah Carlson jcarlson at uci.edu
Mon Feb 12 21:55:10 PST 2007


"Rob McMullen" <rob.mcmullen at gmail.com> wrote:
> 
> On 2/12/07, Josiah Carlson <jcarlson at uci.edu> wrote:
> > My goodness.  I could have sworn that I wrote everything so horribly
> > that it was not only impossible for 3rd parties to modify, but that it
> > being GPLed was really only useful as an example of "what not to do".
> > Congratulations on managing to find a use for some of it. :D
> 
> :)  Actually, I found most of your plugins fairly self-contained.  I
> mean, there are a few global references (e.g. the _pype global), but
> most of the stuff is passed in to the plugin through its init method,
> so I can provide adapters for those.  It took me (literally!) less
> than 30 minutes to write a peppy plugin and adapter for your
> filesystem browser.

That was really only a small wrapper over the pre-existing stuff.


> It took me longer to adapt the search and
> replace, but I did those first and I was still trying to understand
> your code.  Once I understood more about it, it was very easy to
> modify.  I'm sure I'll be incorporating more of your stuff as I go,
> and hopefully if I extend any functionality, you'll be able to plug it
> back into PyPE with no changes to your code.

The search tab should also be fairly straightforward, as there really is
only one place where it opens documents, finds the "current document",
etc.  The code is awful to read, use, and modify (I just about cry every
time I need to dig into it), but in the next version of PyPE, it pulls
out all of the searching into a secondary thread, which among other
things, makes the search go faster (so you may want to wait for it).


> > One of the things that has slowed me down (and what slowed me down when
> > initially working on PyPE 2.0 a couple years back) is saving and
> > restoring the edit control state when moving documents between editors.
> 
> You mean, like saving and restoring sessions?  I hadn't really thought
> about that much, but as I pause to check into
> GetSaveState/SetSaveState I see you've also coded up a VIM settings
> decoder which I'll probably borrow at some point. :)  I also hadn't
> thought about code folding much, either, as I've never really used
> that coming from XEmacs.  I did have an idea for a minor mode that
> automatically folds docstring comments so someone familiar with the
> code could get more of it on screen at once.

There's the session saving/restoring, but then there's moving documents
between different frames.  Scintilla allows for a single document to
have multiple "views", so when you type a character into one view, you
see it in the other view automatically.  See the MultiSash demo for an
example of this.  In the (as of yet unreleased) next version of PyPE, I
use this particular feature to offer a read-only secondary view of a
document.

The reason I mentioned it is so that when you "split" the view, or
otherwise display a document on a "secondary" frame, you may consider
saving the information and handing it off to the new view so that the
user sees the portion of a document that they expect, with cursor,
folding, etc.


 - Josiah





More information about the wxpython-users mailing list