how to use execfile with argument under windows

baur79 baur79 at
Wed Jan 3 04:27:23 EST 2007

os.system() solve my problem

thanks you guys and happy new year

with best wishes from Kazakhstan / Shymkent city /

On Jan 2, 11:49 pm, Peter Otten <__pete... at> 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
> You need os.system() or, for more complex applications, the subprocess
> module.
> Peter

More information about the Python-list mailing list