On ג', 2005-11-01 at 04:33 +0200, guy keren wrote:
> i don't think i'll even mention execfile - i'll just show how to do simple
> stuff in the interpreter, and the rest using scripts.
> [...]
> actually, i don't see why. i usually have one terminal with an editor, and
> another terminal in which i run the script. the work it takes in this
> setup is no more (sometimes even less) then using a single interactive
> interpreter session. the editor is much more convenient for editing then
> the interactive prompt, for me.
> 
One small tip that will enable you to enjoy both worlds in your style:
``python -i script.py`` executes the script as usual and then drops you
into a shell with all functions and variables still defined.  You can
easily inspect and call them.


לענות