Thread: [PyCrust] Some enhancements. Any interest?
Brought to you by:
pobrien
From: Bill B. <wb...@gm...> - 2006-02-26 06:04:11
|
Don't know if anyone reads this list these days or is working on pycrust at all anymore (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 curso= r around the screen other than click and drag. * Added forward history search (to go with the backward history search boun= d 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 :-) ) [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 |
From: Sebastian H. <ha...@ms...> - 2006-02-26 06:23:18
|
Hi Bill, Yes *I* was somehow on this list (didn't know though) ;-) Good to hear that PyCrust is alive ! I would suggest: Please repost your message directly to the wxPython-users list. With the last update of 2.6.2 there have been some improvements to PyCrust - some overlap with yours ... I certainly agree that the sourceforge page is nothing but a trap !! It should be deleted ! Or clearly stated that wxPython.org (maybe it's wiki) is the place to look. Thanks for your work. - Sebastian Haase Bill Baxter wrote: > Don't know if anyone reads this list these days or is working on pycrust > at all anymore (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 > :-) ) [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 |
From: Patrick K. O'B. <po...@or...> - 2006-03-01 12:51:23
|
Sebastian Haase wrote: > Hi Bill, > Yes *I* was somehow on this list (didn't know though) ;-) > Good to hear that PyCrust is alive ! > I would suggest: > Please repost your message directly to the wxPython-users list. > With the last update of 2.6.2 there have been some improvements to > PyCrust - some overlap with yours ... > > I certainly agree that the sourceforge page is nothing but a trap !! It > should be deleted ! Or clearly stated that wxPython.org (maybe it's > wiki) is the place to look. I am interested in changes and enhancements to PyCrust. I'm planning to provide Subversion and Trac support as well as a website (pycrust.org) to support these community efforts. Once that is in place I will shut down the sourceforge project, or at least make sure it redirects better. For now the wxPython-users list is the best place to discuss these things. -- Patrick K. O'Brien Orbtech http://www.orbtech.com Schevo http://www.schevo.org Louie http://www.pylouie.org |
From: Bill B. <wb...@gm...> - 2006-03-01 14:21:13
|
> I am interested in changes and enhancements to PyCrust. I'm planning to > provide Subversion and Trac support as well as a website (pycrust.org) > to support these community efforts. Once that is in place I will shut > down the sourceforge project, or at least make sure it redirects better. > For now the wxPython-users list is the best place to discuss these things= . > > Cool. I put the files for my changes to pycrust up at http://www.billbaxter.com/tmp/bb-pycrust-0.1.0.zip They're in their own package, but you should be able to diff the files against the corresponding wx/py files to see changes. --Bill |
From: Sebastian H. <ha...@ms...> - 2006-03-01 17:40:58
|
Hi Patrick! Good to hear from you ! That sounds great that you are still with us and with PyCrust ;-) + why is there a need for a special "PyCrust subversion" - isn't PyCrust now "part" of wxPython !? see below... + I would really suggest to stop using the pycrust-users list for now ... (I'm cross posting to wxPython-users) + Further I would suggest to IMMEDIATELY make a note to the sourceforge page that PyCrust 0.6 from 2001(?) is NOT the latest and that instead there it is now (more) incorporated into wxPython itself ( refer wxPython.org frontpage and also the wxPython wiki) + To clarify on the name: As Robin wrote just recently (2006-02-15 14:08: "Re: [wxPython-users] Re: Pycrust enhancement with plugins") I would like get your - Patrick - blessing of officially calling the whole project "PyCrust" again - "Py" is too often used as generic prefix as not googleble either ! + I had some improvements myself that mostly made it into the 2.6.2 wPython version (see ChangeLog): most often I use the "free edit"-mode to clean out 100s of lines of "accidental" output; also I like using the search function; the folding function should be made to support nested folds, but I'm not really using it much anymore... What I do use a lot is: drag&drop of files into the shell window to trigger a "paste" of the filename. (I don't think this made it into wxPython !) + I like Bill's idea of adding 'ls' and 'cd' (or other shell functions) - the same way IPython does it -- but I'm not clear of what a good "syntax" would be for this (maybe just a '.[a-zA-Z ]' at the start of the line (or even a space ' ') -- I just think that IPython is much to complex and should not be followed all the way ... + I /would/ like "tab"-completion on variable-, module-, function-, module-attributes-,... names (if not unique a popup) -- but this is just an idea... Thanks for PyCrust ! Sebastian Haase On Wednesday 01 March 2006 04:51, Patrick K. O'Brien wrote: > Sebastian Haase wrote: > > Hi Bill, > > Yes *I* was somehow on this list (didn't know though) ;-) > > Good to hear that PyCrust is alive ! > > I would suggest: > > Please repost your message directly to the wxPython-users list. > > With the last update of 2.6.2 there have been some improvements to > > PyCrust - some overlap with yours ... > > > > I certainly agree that the sourceforge page is nothing but a trap !! It > > should be deleted ! Or clearly stated that wxPython.org (maybe it's > > wiki) is the place to look. > > I am interested in changes and enhancements to PyCrust. I'm planning to > provide Subversion and Trac support as well as a website (pycrust.org) > to support these community efforts. Once that is in place I will shut > down the sourceforge project, or at least make sure it redirects better. > For now the wxPython-users list is the best place to discuss these things. |