Some enhancements. Any interest?

Don’t know if anyone is working on pycrust at all anymore (pycrust.sourceforge is proudly announcing the 0.6 release from 2001 still), but I made some changes to my version of pycrust and wondered if there was any interest in them. Basically I’ve haven’t been using python that long, but it seems to me that among the shells I’ve tried pycrust is the best. But it lacks some of the nice features of ipython. I talked to the main fellow behind iPython and he said there is talk about merging ipython and pycrust, but it’s still a long ways off, blah blah blah.

So here’s a summary of the changes I made in no particular order:

  • Made up and down arrows go through history (currently ctrl-up ctrl-down). I don’t see why anyone would want the most common option to be moving the cursor around the screen. Most shells don’t have any way to move the cursor around the screen other than click and drag.

  • Added forward history search (to go with the backward history search bound to F8). Also made the history search default to normal non-search history scrolling if done at the beginning of the line (instead of doing nothing like it used to)

  • Made ctrl-up and ctrl-down do up and down history search (ctrl-up does what F8 does)

  • Added Ctrl-U key combo to erase the current line (like in bash, and like Esc currently does)

  • Modified the about dialog so it doesn’t beep (using ScrolledMessageDialog instead of MessageDialog) (Beep was annoying me)

  • Modified the help dialog so it doesn’t beep (again using ScrolledMessageDialog), and made it actually display the help text rather than telling you to type ‘shell.help()’. (Annoying!)

  • Made exit,close,quit actually quit the shell, after asking if it’s ok, rather than tell you to click on the close box. (also annoying to me :slight_smile: ) [incidentally this was done by creating a little helper class whose repr method does the closing. Not sure if this is considered horrible python style or not, but it lets you type just ‘quit’ instead of ‘quit()’.

  • Changed the settings to be saved in $HOME on all platforms if $HOME is set. wx’s GetUserDataDir() ignores $HOME on Windows because it’s not standard, but my opinion is that a lot of programmers do set it, and so, if it’s set, it should be used instead of the standard “Documents and Settings” folder.

  • In my own settings I added a ‘cd’ and ‘ls’ command to navigate the directory structure more easily. These might be nice to have in pycrust itself.

Wishes for further pycrust features that should be relatively easy to add:

  • A current directory display, perhaps with history of recently used directoryies. I’m thinking a popdown combobox, like Matlab has.
  • A way to change the shell’s font
  • A better way to handle magic shell level commands like ‘exit’ or ‘cd’ or ‘ls’. I looked at the interpreter class a bit, but it wasn’t clear right off where the best place to examine commands and “intervene” if they shouldn’t be evaluated by python. It would be nice if you could make those more like unix shell commands. i.e. ‘ls c:\foo’ would work (instead of) “ls(r’c:\foo’)”, and you could get tab completion of filenames etc.

Wishes for things that would be slightly more work:

  • User settable key combos instead of hard coded keys.

  • Debugger integration

Let me know if anyone is interested in these changes and I can post the code. For now I just made copies of the only files I changed (PyCrust.py, crust.py, shell.py, and version.py) and put them in a separate module so that I can have both the original pycrust and my modded version coexisting.

–Bill

Don't know if anyone is working on pycrust at all anymore

Did you read the wxpython mailing list in the last months?
Then you see, there is still quite a lot of interest and
some patches were applied.

(
pycrust.sourceforge is proudly announcing the 0.6 release from 2001 still),
but I made some changes to my version of pycrust and wondered if there was
any interest in them.

Sure.
Pycrust Sourceforge project isn't maintained anymore,
the "PY" package is in the wxPython distribution itself.

Basically I've haven't been using python that long,
but it seems to me that among the shells I've tried pycrust is the best.

Second.

But it lacks some of the nice features of ipython. I talked to the main
fellow behind iPython and he said there is talk about merging ipython and
pycrust, but it's still a long ways off, blah blah blah.

Really? This sounds interesting.

So here's a summary of the changes I made in no particular order:

* Made up and down arrows go through history (currently ctrl-up ctrl-down).
I don't see why anyone would want the most common option to be moving the
cursor around the screen.

To get a previous command.
To change the position of beginning a search.
To copy come code.
...

Most shells don't have any way to move the cursor
around the screen other than click and drag.

IDLE for example.

[Suggestions]

This I let comment Robin. :wink:

* User settable key combos instead of hard coded keys.

This could be nice.

Let me know if anyone is interested in these changes and I can post the
code. For now I just made copies of the only files I changed (PyCrust.py,
crust.py, shell.py, and version.py) and put them in a separate module so
that I can have both the original pycrust and my modded version coexisting.

I do it the same way.

···

On Mon, 27 Feb 2006 11:27:02 +0900, "Bill Baxter" <wbaxter@gmail.com> wrote:

--
Franz Steinhaeusler

Don’t know if anyone is working on pycrust at all anymore

Did you read the wxpython mailing list in the last months?

Then you see, there is still quite a lot of interest and
some patches were applied.

Sorry haven’t seen it. Just signed up for this list today. I’ll take a peak at the archives for recent messages about pycrust.

(
pycrust.sourceforge is proudly announcing the 0.6 release from 2001 still),

but I made some changes to my version of pycrust and wondered if there was
any interest in them.

Sure.
Pycrust Sourceforge project isn’t maintained anymore,
the “PY” package is in the wxPython distribution itself.

I was aware of that, but it still has it’s own mailing lists and trackers and stuff set up on sourceforge. The sourceforge page should really mention that all pycrust related stuff has moved into wxpython.

Basically I’ve haven’t been using python that long,
but it seems to me that among the shells I’ve tried pycrust is the best.

Second.

Are you seconding my “nomination” or saying it’s the not the best, but the second best?

But it lacks some of the nice features of ipython. I talked to the main
fellow behind iPython and he said there is talk about merging ipython and
pycrust, but it’s still a long ways off, blah blah blah.

Really? This sounds interesting.

If you google you’ll find a few hits on discussions from over a year ago about integrating ipython and pycrust, but it never got off the ground. I wouldn’t hold my breath if I were you waiting for this to be completed. Which is why I went ahead and started making changes to pycrust myself to the get the things I wanted the most.

So here’s a summary of the changes I made in no particular order:

  • Made up and down arrows go through history (currently ctrl-up ctrl-down).
    I don’t see why anyone would want the most common option to be moving the
    cursor around the screen.

To get a previous command.

To change the position of beginning a search.
To copy come code.

Mouse selection still works fine if you really need to copy.

Most shells don’t have any way to move the cursor
around the screen other than click and drag.

IDLE for example.

Yeh, my bad, what I really meant was OS command prompts, like bash, etc. Yes, IDLE lets you move around with your cursor keys, but what’s your point? IDLE is not a very good shell.

[Suggestions]
This I let comment Robin. :wink:

  • User settable key combos instead of hard coded keys.

This could be nice.

There’s a fancy keyboard settings class for C++ wxWidgets. Something similar would be nice for wxPy if no one has made it yet. I’m sure the python version would be much better than anything possible with C++, since config files could actually contain executable python code snippets. http://wxcode.sourceforge.net/components/keybinder/

Let me know if anyone is interested in these changes and I can post the
code. For now I just made copies of the only files I changed (PyCrust.py,
crust.py, shell.py, and version.py) and put them in a separate module so

that I can have both the original pycrust and my modded version coexisting.

I do it the same way.

Good to know i’m in good company, then. :slight_smile: But it would be nice to know we’re not all reinventing the same wheel here when these tasty enhancements could be going out to make life better for all pycrust users.

Cheers,
–Bill B.

···

On 2/27/06, Franz Steinhaeusler franz.steinhaeusler@gmx.at wrote:

On Mon, 27 Feb 2006 11:27:02 +0900, “Bill Baxter” wbaxter@gmail.com wrote:

[...]
Sure.
Pycrust Sourceforge project isn't maintained anymore,
the "PY" package is in the wxPython distribution itself.

I was aware of that, but it still has it's own mailing lists and trackers
and stuff set up on sourceforge. The sourceforge page should really mention
that all pycrust related stuff has moved into wxpython.

"""
About PyCrust
  
PyCrust is an interactive Python shell written in Python using wxPython.
PyCrust is now part of wxPython (www.wxpython.org), so packaged files
are no longer available here, and the latest
development version has moved to the wxWindows CVS repository.

"""

Basically I've haven't been using python that long,
>but it seems to me that among the shells I've tried pycrust is the best.

Second.

Are you seconding my "nomination" or saying it's the not the best, but the
second best?

I meant, Pycrust is the best shell for me too.

···

On Mon, 27 Feb 2006 22:03:13 +0900, "Bill Baxter" <wbaxter@gmail.com> wrote:

On 2/27/06, Franz Steinhaeusler <franz.steinhaeusler@gmx.at> wrote:

--
Franz Steinhaeusler

Franz Steinhaeusler wrote:

···

On Mon, 27 Feb 2006 11:27:02 +0900, "Bill Baxter" <wbaxter@gmail.com> wrote:

Don't know if anyone is working on pycrust at all anymore

Did you read the wxpython mailing list in the last months?
Then you see, there is still quite a lot of interest and
some patches were applied.

See also this patch on SF:

https://sourceforge.net/tracker/?func=detail&atid=310718&aid=1436595&group_id=10718

Where Franz and I are discussing plugin architectures. I think however that I'll move my next reply to this list so more people can more easily get involved.

--
Robin Dunn
Software Craftsman
http://wxPython.org Java give you jitters? Relax with wxPython!

just throwing in my $0.02 ...

* Made up and down arrows go through history (currently ctrl-up ctrl-down).
I don't see why anyone would want the most common option to be moving the
cursor around the screen.

Yes, yes, yes!

To get a previous command.

--but that's what you get through history, and with fewer keystrokes.

To change the position of beginning a search.
To copy come code.

-- both far less common than getting your last command back, and easier (and more frequently?) done with the mouse. I say ctrl+up-arrow for those.

- Chris

···

--
Christopher Barker, Ph.D.
Oceanographer
                                         
NOAA/OR&R/HAZMAT (206) 526-6959 voice
7600 Sand Point Way NE (206) 526-6329 fax
Seattle, WA 98115 (206) 526-6317 main reception

Chris.Barker@noaa.gov

Heh heh. Ok. Mea culpa. So it does say that. I was seduced by the big green button saying “DOWNLOAD PYCRUST” and the bright blue bold font announcing “PyCrust 0.6 - Fresh from the oven!” I skipped over the “About PyCrust” part because I already knew what pycrust was about. :slight_smile:

–bb

···

On 2/27/06, Franz Steinhaeusler franz.steinhaeusler@gmx.at wrote:

On Mon, 27 Feb 2006 22:03:13 +0900, “Bill Baxter” wbaxter@gmail.com wrote:

On 2/27/06, Franz Steinhaeusler < > franz.steinhaeusler@gmx.at> wrote:

http://sourceforge.net/projects/pycrust

“”"
About PyCrust

PyCrust is an interactive Python shell written in Python using wxPython.

PyCrust is now part of wxPython (www.wxpython.org), so packaged files
are no longer available here, and the latest
development version has moved to the wxWindows CVS repository.

“”"