Command-line tool able to take multiple commands at one time?

bruno at modulix onurb at xiludom.gro
Fri Nov 11 05:25:03 EST 2005


Peter A. Schott wrote:
> Per subject - I realize I can copy/paste a line at a time into an interactive
> session when I'm trying to debug, but was wondering if there is any tool out
> there that allows me to copy sections of working Python scripts to paste into my
> interactive console and let those run so I don't have to copy line-by-line.

There's much better than that : emacs + python-mode let you evaluate
either the whole script, a single class or def statement, or an
arbitrary region in an interactive Python interpreter running as an
emacs sub-process. Of course, this interpreter don't die after, so you
can inspect/play with/do whatever with the results of this evaluation.

-- 
bruno desthuilliers
python -c "print '@'.join(['.'.join([w[::-1] for w in p.split('.')]) for
p in 'onurb at xiludom.gro'.split('@')])"



More information about the Python-list mailing list