Aaron Spike wrote:
ricardo lafuente wrote:
Here's a call for help, as i'm totally stuck in this. I've been getting familiar with Python extensions and managed to whip up a couple. I ran into an issue, though: if i call an external command (using os.system('pwd'), for the simplest example), it executes it but doesn't go through the rest of the extension script, closing the window and returning to Inkscape. (i believe the same happens with exec statements) I thought it could be that the extension architecture doesn't allow for running external commands, but fact is that the extension actually executes it before borking. Am i missing something obvious?
I don't know of any such limitation. There are even a few scripts included with Inkscape that execute external processes. Check out gimp_xcf.py. It executes a number of external processes of both Inkscape and GIMP.
http://inkscape.svn.sourceforge.net/viewvc/inkscape/inkscape/trunk/share/ext...
thanks for this -- i looked for plugins that executed external processes but didn't find anything. now my script is working properly; apparently, executing a command with os.popen3 will work, but os.system just left me hanging (on 0.45). i did try with the example hello_world.py script, and introducing a line like 'os.system("pwd")' will make it stop and close without warning. os.popen3 works perfectly though... so no biggie here.
thank you :o) ricardo