Bernd Dorn wrote at 2005-2-12 10:09 +0100:
... i try to execute a shell command (namely pdftk) from python/zope to fill out fdf forms in a pdf document
this is my command, which is generated: pdftk /tmp/tmpRy0O_T.pdf fill_form /tmp/tmpz4mEG1.fdf output /tmp/tmpx1TxTD.pdf flatten
the pdf and fdf files are temporary files
i have a testcase which runs the surrounding method successfully (python only no zope), but wenn i access the method from zope it hangs when the pdftk command tries to write to the output files and i have to kill -9 the pdftk processes
i've already tried with popen3, os.system etc.
this problem does NOT occur on macos x, only on linux, for windows i don't know.
This question is more a "pdftk" one than a Zope one... Depending on how you start Zope, the process environment may well be quite different from that of a normal Python script: * the process may not have a control terminal * the process may have "stdin", "stdout" and "stderr" redirected to "/dev/null" * the working directory may be different Try to start Zope in the foreground ("bin/zopectl fg"). In this case, the first two points above do not apply. See whether "pdftk" then runs. You can try to attach the "pdftk" process with GDB to check where it hangs. The program should not be stripped when you try this. -- Dieter