Hello all,
Because Pycrust is my most beloved program in the
wxPython distribution (and the best python shell),
I want to customize it and make it commonly extensible,
without breaking the code.
The best solution: Plugins!
(For me, with this mechanism, we could improve it simple).
Dan Pozmanter introduced with DrPython this
simple, highly functional mechanism,
which I tried to adopt into Pycrust.
Thanks to Dan for this geat Editor!!
All my coding I do with DrPython, and it saves
me a lot of time!
I placed the plugins directory directly under Py to eliminate
the Directory switching.
It is my first Prototype.
My reasons:
- Pycrust should stay small, and with adding more features, can become bloated,
and will maybe getting slower.
- Everyone can decide, what functionality he/she wants to add yourself.
- New code will not break other code (simply deactivate the plugin, if
it will come to problem and/or try to solve the problem)
- some seldom used function or functions, which not many user need,
could also be back up in plugins (for example the "free editing" mode)
(I don't know, if it is possible so easy, but this come into my mind)
To the two plugins (I have posted them a few months ago,
but I didn't get any response; all the same) some words:
AutoCompManager:
simply try out, it should be self explaining.
it isn't complete yet (multiple inheritence, show call tip,
filter for classes, show class trees, ....) are in my mind.
It could be especially useful for beginners.
(I use it often to see the functions separated in the resective base classes;
searching is easy)
if you type for example "*get" in the edit box (all functions which contains get are listed)
"=get" all this which contains "get", but don't start with "get"
Coloring of different base class should simplify the recognition of them.
you can navigate (up down) the listctrl without losing the focus in the textctrl.
Sortable after Function name and after Classes.
Show Derived and non derived members.
Shrink (non shrink isn't working properly yet)
IdleColorStyle:
I like the colouring of IDLE, so I tried to duplicate this.
For (my own reasons), I didn't use the EVT_STYLE_NEEDED event,
because the parsing would be much more difficult,
and I assigned the styles for prompt, stdin, and stderr directly.
Maybe someone is other opinion, but this I found much more simpler.
Still not perfect (String parsing for example).
It could also simplify the transition for people, who uses IDLE
and the Pycrust.
And this is the good point:
Plugins are not part of the "core" Pycrust, and if someone don't like them,
simply do not include them or customize them to your needs.
I really enjoy this playing with Pycrust
and additionally Pycrust itself helps me to enhance Pycrust!!
I would be interested, if it is commonly found useful,
but please no critic on code at this time (as said protoype).
Any suggestions, comments and even ideas for new PyCrust plugins are
highly welcomed.
And also is this working for everyone (also on Linux?)
@Robin: Could you in principle imagine to include such
a functionality into a further release?
If so: Would you prefer sending patches?
There is still the PyCrust project on Sourceforge, but not maintained anymore for years.
Should we continue there?
Create a new project (under another name)?
Shall we restrict the project to only make plugins and offer them for download?
I have plans to enhance the plugin functionality (Plugin Help, preferences, About)
Load plugins manually, after you started PyCrust.
Beside plugins, short scripts (or in other words macros) would also be interesting.
Enough said.
To (safely) try out:
please make a backup or better copy your py directory (name it py_original or similar)
then in the original py, you excract my changed files.
http://mitglied.lycos.de/drpython/pycrustpluginsample12_Feb_2006.zip
(to minimize the download size (32 kb), I have only packed the changed files)
Cheers,
···
--
Franz Steinhaeusler