[Idle-dev] IDLE command line
Kurt B. Kaiser
kbk at shore.net
Wed Sep 22 07:17:26 CEST 2004
"Gene" <ceti at socorroisp.com> writes:
> How do I run a python program from IDLE command line window?
I assume you mean the window titled "Python Shell".
The same way you would run it from the Python interactive interpreter.
Import the module. If it won't import, it's probably not on your
sys.path; you can cd to the directory containing the .py file before
you start IDLE.
If the module uses the
if __name__ == "__main__" :
idiom, that should be enough to run it. Otherwise, you will need to
call some function in the module.
See the tutorials:
More information about the IDLE-dev