Newbie Question: Is there a Python equiv to Perl's "do" statement?

Martijn Faassen m.faassen at vet.uu.nl
Thu Apr 27 14:24:12 EDT 2000


Christian Tismer <tismer at tismer.com> wrote:


> mdefreitas at sikorsky.com wrote:
>> 
>> I'm trying to call a python script from another python script (given
>> the filename).

> Yes, you can use the execfile function to do that.

> execfile("otherscript.py")

And please do consider breaking up your system into modules which
get imported, instead of using execfile(). Generally a much cleaner
way to organize your code. And more powerful, to boot.

Regards,

Martijn
-- 
History of the 20th Century: WW1, WW2, WW3?
No, WWW -- Could we be going in the right direction?



More information about the Python-list mailing list