Skip to content

Instantly share code, notes, and snippets.

@marcinwol
Last active August 29, 2015 14:26
Show Gist options
  • Save marcinwol/a0f7bf5608ce7b2279b4 to your computer and use it in GitHub Desktop.
Save marcinwol/a0f7bf5608ce7b2279b4 to your computer and use it in GitHub Desktop.
Start gimp from IrfanView in Ubuntu
#!/usr/bin/python3
#
# add this, for example, /home/marcin/bin/startgimp.py
# to IfranViews Miscellaneus Properties/Settings
#
import os
import sys
gimp_cmd = '/usr/bin/gimp-2.8 '
if len(sys.argv) == 2:
img_file = sys.argv[1]
img_file = img_file.replace('\\', '/')
img_file = img_file.replace('Z:', '')
gimp_cmd += '"'+img_file+'"'
#with open('/home/marcin/Desktop/test.txt', 'w') as f:
# f.write(img_file)
#print(gimp_cmd )
os.system(gimp_cmd )
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment