如何在 GimpFU python 中传递参数?
#!/usr/bin/env python
from gimpfu import *
import traceback
import sys
def upload_image(img, layer, dir):
# Actual plug-in code will go here
try:
open('/tmp/upload.txt', 'w+').write('img:\n')
except:
open('/tmp/upload_error.txt', 'w+').write(traceback.format_exc())
open('/tmp/upload_error.txt', 'a').write(sys.exc_info()[0])
return
register(
"Uploader",
"Boo",
"Far",
"foo",
"bar",
"2014",
"<Image>/File/Upload",
"*",
[],
[],
upload_image)
main()