I have added some small features to pyshell/pycrust that are similar to ipython :
- calling functions even without ending parentheses :
dir
→ dir()
[‘builtins’, ‘doc’, ‘file’, ‘name’, ‘a’, ‘filling’, ‘magic’, ‘notebook’, ‘pp’, ‘shell’, ‘yam’, ‘yaml’]
- magical functions that takes the rest of the line whatever is it as a string parameter (and I implemented a few) :
pwd
‘/home/nevare’
cd Desktop
‘/home/nevare/Desktop’
exe date
‘samedi 24 mars 2007, 20:11:38 (UTC+0100)\n’
- a special magical function : ‘?’ that can be placed before or after an object and returns its doc
?dir
Python Library Documentation: built-in function dir in module builtin
dir(…)
dir([object]) → list of strings
Return an alphabetized list of names comprising (some of) the attributes
of the given object, and of attributes reachable from it:
Would you be interested in having me commenting a bit my code and make a patch that could be integrated in pyshell ?
I would also like to give it a better completion (it is limited for the time being).
And also had some features that enable people to write python modules entirely in a shell. Like :
export.file = ‘~/Desktop/parrot.py’
class parrot
…
math.init = …
def isDead(self,…):
…
math.isDead = isDead
math.isMoving = …
export(math)
And it would export refactored source code of the math class and all its modifications to the .py file.
Don’t you think that would be cool ?
I suppose you wouldn’t be interested to have me work on it for the
summer of code. (well I understand it’s not really related to core of
wxpython).
I may still do it someday … if I find the time and energy.
Olivier Lauzanne