Skip to content

Instantly share code, notes, and snippets.

@sungmin-park
Created January 10, 2012 20:08
Show Gist options
  • Save sungmin-park/1590910 to your computer and use it in GitHub Desktop.
Save sungmin-park/1590910 to your computer and use it in GitHub Desktop.
os.system vs subprocess.call
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