os.system on "program files"

Ulrich Petri ulope at gmx.de
Tue May 6 15:56:21 EDT 2003


"Cipo Fuzo" <cipofuzo at home.com> schrieb im Newsbeitrag
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.
>
>

Try:
os.system(r'c:\progra~1\imagemagick\convert.exe -draw "text 0 0 hello"
in.jpg out.jpg')

Ciao Ulrich






More information about the Python-list mailing list