Open orbisvicis opened 12 years ago
Apparently, "python2" isn't ubiquitous enough to warrant a patch. The above will remain in distro-specific package files.
My understanding is that the hash bang is read by a shell. As I recall, the plug-in scripts are only usable from within GIMP and serve no purpose when called from a shell. Thus the hash bang is superfluous and I propose to remove it instead of changing it as you propose.
But I could be wrong, I need to study more especially concerning how GIMP in command line ( batch mode?) might execute plug-ins. In that case, I think GIMP must still be invoked first, GIMP invokes some version of a python interpreter, and GIMP does not read the hash bang.
Possibly the plug-in should check the version of Python separately, without the hash bang. I think it is of low priority, and would only serve rare users using very old Python.
Probably a higher priority for me to test that the plug-ins don't break under Python 3.
I propose to remove it
+1, if batch mode doesn't require it. I'm not familiar with this.
plug-in should check the version of Python separately
-1
test that the plug-ins don't break under Python 3.
Here is an initial patch, as much as I could do without installing the plug-in and testing through gimp itself: http://sprunge.us/TjMR
There are some missing modules, such as "gettext", which I assume gimp will import in lieu of the plugin itself. Therefore I didn't fix these errors.
Also, testResynth.py seems broken:
(process:32019): GLib-CRITICAL **: g_hash_table_lookup: assertion `hash_table != NULL' failed
** (process:32019): ERROR **: could not find handler for message: 6
Trace/breakpoint trap
Causative line (119):
image = pdb.gimp_file_load(infilepath, infilepath, run_mode=RUN_NONINTERACTIVE)
The included plug-in scripts are for python2 and thus should have the hashbang changed:
see: http://www.python.org/dev/peps/pep-0394/