[python-win32] os.system problem

David Rock david at graniteweb.com
Wed Aug 6 23:19:06 EDT 2003


* ryan <toxicpulse at sbcglobal.net> [2003-08-06 16:43]:
> how do you properly quote an os.system() call so i can load a file on a command line argument. i have tried: 
> 
> os.system('C:\\"foo bar"\\some.exe %s' % filename)
> 
> but for some reason thats only loading some.exe, but not on filename

I usually do something like this:

command = 'C:\\"foo bar"\\some.exe %s' % filename
os.system( command )

-- 
David Rock
david at graniteweb.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 232 bytes
Desc: not available
Url : http://mail.python.org/pipermail/python-win32/attachments/20030806/34f1ca74/attachment.bin


More information about the Python-win32 mailing list