Idea: Python Shorthand (was Re: Why a class when there will only be one instance?
Ville Vainio
ville at spammers.com
Tue Jun 1 05:08:18 EDT 2004
>>>>> "Josh" == Josh Gilbert <jgilbert+python at uvm.edu> writes:
>> But isn't IPython solely for interactive use?
>>
Josh> Yes, you are correct. A decided limitation. You can
Josh> automatically save the Python statements from a session and
Josh> paste them into a file, but you cannot edit an existing file
Josh> in an interactive mode. I'm afraid I have to admit ignorace
Josh> here, does Emacs offer more?
Well, one idea would be to bind some kind of py-expand-current-line
command to the enter key, in addition to the normal newline
operation. Editing/creating the script would proceed as usual, with
the additional advantage of shorthand writing.
Normal emacs 'abbrev' processing won't do the trick, because
abbreviations are expansion of short string to long string, not
expansion of identifier with parameters to identifier with the same
parameters in other places/other representations.
--
Ville Vainio http://tinyurl.com/2prnb
More information about the Python-list
mailing list