john_zenger at yahoo.com
Thu Mar 2 02:10:33 CET 2006
> I wrote up a script in my preferred text editor. It contains maybe ten
> lines of code. I want to be able to execute those code lines with a
> single command either from the inline mode or from IDLE. How do I do
> this? I saved the file (myscript.py) in a folder that I've specified
> in my PYTHONPATH environment variable, and when I type
From the Python shell, you can use execfile to run a script:
This works regardless of your OS. The file must be in your Python path.
If it isn't, just specify the full path. Like:
While viewing your code with IDLE, hit F5 to execute it.
More information about the Python-list