how to use execfile with argument under windows

baur79 baur79 at gmail.com
Wed Jan 3 10:27:23 CET 2007


os.system() solve my problem

thanks you guys and happy new year

with best wishes from Kazakhstan / Shymkent city / sodbisystems.kz


On Jan 2, 11:49 pm, Peter Otten <__pete... at web.de> wrote:
> 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




More information about the Python-list mailing list