From: Rob Antonishen <rob.antonishen@gm...> - 2010-02-17 18:32:23
I discovered the restack extension stopped working (under windows at
any rate) in .47 for more than 82 objects in the svg document
The code calling inkscape with the --query-all parameter (to get all
the bounding boxes) was:
p = Popen('inkscape --query-all "%s"' % (file),
shell=True, stdout=PIPE, stderr=PIPE)
rc = p.wait()
f = p.stdout
err = p.stderr
It will just hang the python window in such a case.
I found my removing the rc = p.wait() line the extension will work...
but I am not sure of the impact of making that change.
I see the Popen.wait call is used in other extensions as well, but
they all seem to be using the single object query flag --query-id=ID,
so so not experience this problem.
The python docs state Popen.wait "will deadlock if the child process
generates enough output to a stdout or stderr pipe such that it blocks
waiting for the OS pipe buffer to accept more data. Use communicate()
to avoid that."
but it also states that with communicate() "The data read is buffered
in memory, so do not use this method if the data size is large or