[Zope] popen2, popen3, popen4 and Zope

Dieter Maurer dieter at handshake.de
Wed Feb 4 15:59:57 EST 2004


Dennis Allison wrote at 2004-1-31 10:06 -0800:
>The popen libraries don't seem to function properly when used from 
>a Zope External Method or product.  I use the standard idiom -- 
>	i, o = os.popen2( cmd )
>	i.close()
>	res = o.read()
>
>but Zope seems to hangs on the read whenever cmd is anything of any
>complexity, for example, a shell script that fires off a python instance
>that detaches itself and then initiates another insance of Zope. Is the
>problem a threading issue?

Probably not:

  I used "ZCVSFolder" which uses "popenX" and did not have
  problems.

Almost surely, your "cmd" buffers its output and does not make
a "flush".

-- 
Dieter



More information about the Zope mailing list