os.system on "program files"

Cipo Fuzo cipofuzo at home.com
Tue May 6 13:34:41 EDT 2003


Hello,

I'm executing a program from c:\program files\... on windows.
I've found previous articles that suggest putting "s around
the executable path, which works, BUT:

The executable I'm calling requires on of its arguments to be
in "s:

>>> os.system(r'"c:\prgoram files\imagemagick\convert.exe" -draw "text 0 0 hello" in.jpg out.jpg')

I get:

'c:/program' is not recognized az an internal or external command

if I take the "s off the argument:

>>> os.system(r'"c:\prgoram files\imagemagick\convert.exe" -draw text 0 0 hello in.jpg out.jpg')

convert starts, but now it's not getting the correct arguments.


Is this a bug in os.system?
Any ideas how to solve this?

Thanks,
Cipo





More information about the Python-list mailing list