os.system on "program files"

Mars martin_a_clausen at hotmail.com
Tue May 6 18:05:37 EDT 2003


Hi Cipo

If your quotes below are cut and paste, the cause of the error might
be the spelling mistake in "c:\prgoram files..." which should be
"c:\program files"

Just an idea.

Mars
Cipo Fuzo <cipofuzo at home.com> wrote in message news:<slrnbbfshg.pm.cipofuzo at server.panka.com>...
> 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