is it possble to run a script from the python shell?
Aahz
aahz at pythoncraft.com
Tue May 4 00:05:26 EDT 2004
In article <MPG.1b00d7f67c9240d6989682 at newsstand.cit.cornell.edu>,
Darren Dale <dd55 at cornell.edu> wrote:
>
>If so, how is it done? This is probably a stupid question. But when I
>os.chdir into a directory that I know contains a python file, when I try
>to call it
>
>>>>color_demo.py
>
>I get
>
>NameError: name color_demo is not defined
Try
>>> execfile('color_demo.py')
--
Aahz (aahz at pythoncraft.com) <*> http://www.pythoncraft.com/
Adopt A Process -- stop killing all your children!
More information about the Python-list
mailing list