Script executes script?

Vladimir Ivanov mahasamatman at nm.ru
Wed Sep 1 06:36:30 EDT 2004


Mipe wrote:
> Hello,
> 
> for a testmodule I need to execute a python script from within a
> python script. Something like:
> 
> -- ScriptA -->
> import whatever
> 
> RunScript("scriptb.py")
> RunScript("scriptc.py")
> <-- Script A --
> 
> Is this possible? I didn't find a possibility to do this.
> 
> Would be nice if you could give me some advice here.
> 
> Thank you,
> Mipe
import os
path_to_python = "c:\\Python23\\python.exe"
path_to_script = "e:\\temp\\test.py"
os.system(path_to_python + " " + path_to_script)




More information about the Python-list mailing list