The documents recommend against using subprocess.call
with shell=True
, however when I try to do something as simple as
call(['convert'])
I get an error:
Must specify a file system
When I run the same command via cmd.exe, I get
C:\Users\Mark>convert
Version: ImageMagick 6.7.3-6 2011-11-10 Q16 http://www.imagemagick.org
...
etc., i.e., it actually runs.
So what's call
doing? Why is it looking for a file?
Does it require a full path to the .exe? If so, I'd prefer not to do that, as I don't know where all the .exes are located.
Just tried it with the full file path to a program (call(['C:/imagemagick/convert.exe'])
) and that works. But the question still stands...how do you do it without the full path? Just have it execute from working directory?