Mon Feb 18, 2013 6:02 am
Mon Feb 18, 2013 7:37 am
dinasset wrote:Hi everybody,
I have some (hopefully not insane...) curiosity on the subject.
1 - why are scripts in python handled as plug-ins? they are interpreted as scripts in scheme are, they are not compiled-executable (IMHO it would have been clearer to have three categories : .scm scripts, .py scripts and .exe plug-ins; -or not to proliferate interpreted and executables-)
2 - why there is no "refresh" function for the python scripts as for the scheme scripts? when there is some error in one script it's a very useful function
3 - when launching gimp in -verbose mode, if in a python scripts there is a formal error it simply does not appear instead of reporting the error found in it; so it is very difficult to find out the error, I know there is the console but it seems to be available only for the operations not for the parameters of the definition (yesterday I was trying to find out what was wrong with a PF_OPTION parameter and spent a lot of time, finally finding the solution in a French chat...)
I hope among those of you who like programming for gimp there is somebody who likes to give some answer to a novice...
Thanks
Traceback (most recent call last):
File "/home/me/.gimp-2.6/plug-ins/bad-path-dump.py", line 115, in <module>
domain=("gimp20-python", gimp.locale_directory)
File "/usr/lib/gimp/2.0/python/gimpfu.py", line 228, in register
"elements (%s given: %s)" % (len(ent), ent))
gimpfu.error: parameter definition must contain at least 4 elements (3 given: (1001, 12, (0, 3, 1)))
python the_script.py
Mon Feb 18, 2013 8:05 am
Mon Feb 18, 2013 8:07 am
Mon Feb 18, 2013 8:11 am
Mon Feb 18, 2013 8:27 am
Mon Feb 18, 2013 9:39 am
Mon Feb 18, 2013 9:51 am
Mon Feb 18, 2013 9:57 am
For 2) yes. For 3), no, running the script outside of Gimp only checks syntax errors. Invalid registration semantics are caught by gimpfu which you can't run at that point.dinasset wrote:Thanks a lot Ofnuts!
from your reply to point 2, if I'm not wrong, I understood that if I change the code (not the registration) in a python script I can rerun it immediately without closing/re-opening gimp? excellent!
from your reply to point 3, if again I'm not wrong, I understood that if I run the python script with the command python (I have downloaded/installed Komodo so I can run the command) also the registration syntax will be checked? excellent again!
To have the traceback capability available under Linux also under Windows would be great (in fact, also giving to Windows an output file - as I did -, we get only what appeared on the console, nothing more, thus nothing about failing python scripts).
Thanks a lot again for your info!
Mon Feb 18, 2013 11:48 am
Tue Dec 24, 2013 3:43 am
dinasset wrote:to Ofnuts: thanks (I hoped also 3 was possible...sigh)
to keshef: so far I found the link but didn't succeed in installing PUDB, but anyway, before continuing, could you tell me whether you operate on win and whether PUDB is able to check also the semantic related to the gimp-fu implementation of python? thanks