[Zope-dev] zope-tests - FAILED: 21, OK: 19

Tres Seaver tseaver at palladion.com
Fri Sep 7 17:27:38 UTC 2012


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 09/06/2012 03:08 PM, Stefan H. Holek wrote:
> On 06.09.2012, at 10:58, Marius Gedminas wrote:
> 
>> How do you redirect the stderr of a process spawned with 
>> suprocess.Popen(shell=False) to /dev/null in a cross-platform
>> manner?
> 
> os.devnull perhaps? Or rather, what about subprocess.Popen(cmd,
> stderr=subprocess.PIPE)?

subprocess.PIPE is no good -- it sets up stderr to be read from the
parent process.  If enough stuff gets written without the parent reading,
the child will block.


Tres.
- -- 
===================================================================
Tres Seaver          +1 540-429-0999          tseaver at palladion.com
Palladion Software   "Excellence by Design"    http://palladion.com
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://www.enigmail.net/

iEYEARECAAYFAlBKLooACgkQ+gerLs4ltQ4SzQCeKdcaC5s0Xae3ByPh84n2fZPw
/qMAnA6uzro7BFFLxoq7+zfXi499rib4
=XlCf
-----END PGP SIGNATURE-----



More information about the Zope-Dev mailing list