Script executes script?

Peter Hansen peter at engcorp.com
Wed Sep 1 07:29:42 EDT 2004


Vladimir Ivanov wrote:

> import os
> path_to_python = "c:\\Python23\\python.exe"
> path_to_script = "e:\\temp\\test.py"
> os.system(path_to_python + " " + path_to_script)

Ugh.  At least use sys.executable to find the
interpreter if you're going to do it this way.

-Peter



More information about the Python-list mailing list