how to use execfile with argument under windows
Peter Otten
__peter__ at web.de
Tue Jan 2 12:49:06 EST 2007
More information about the Python-list mailing list
Tue Jan 2 12:49:06 EST 2007
- Previous message (by thread): how to use execfile with argument under windows
- Next message (by thread): how to use execfile with argument under windows
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
baur79 wrote:
> i need to execute this command line (different source for n times)
>
> filename.exe -type png -source sourcearg -file filename.png
> i try with python (python script and filename.exe in same directory)
> execfile("filename.exe -type png -source sourcearg -file filename.png")
That does not do what you think it does, see
http://docs.python.org/lib/built-in-funcs.html#l2h-26
You need os.system() or, for more complex applications, the subprocess
module.
Peter
- Previous message (by thread): how to use execfile with argument under windows
- Next message (by thread): how to use execfile with argument under windows
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Python-list mailing list