Created
January 10, 2012 20:08
-
-
Save sungmin-park/1590910 to your computer and use it in GitHub Desktop.
os.system vs subprocess.call
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import os | |
os.system() | |
# http://bugs.python.org/issue1524 | |
os.system( | |
'call "c:\\Program Files\\ImageMagick-6.7.4-Q16\\convert.exe" ' + \ | |
'"c:\\Users\\Public\\Pictures\\Sample Pictures\\Chrysanthemum.jpg"' + \ | |
' ' + '"c:\\Users\\Public\\Pictures\\Sample Pictures\\Chrysanthemum.gif"' | |
) | |
from subprocess import call | |
call([ | |
'c:/Program Files/ImageMagick-6.7.4-Q16/convert.exe', | |
'c:/Users/Public/Pictures/Sample Pictures/Chrysanthemum.jpg', | |
'c:/Users/Public/Pictures/Sample Pictures/Chrysanthemum.gif' | |
]) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment