Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #8525 > unrolled thread

Re: Trying to chain processes together on a pipeline

Started byChris Rebert <clp2@rebertia.com>
First post2011-06-27 23:52 -0700
Last post2011-06-27 23:52 -0700
Articles 1 — 1 participant

Back to article view | Back to comp.lang.python

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  Re: Trying to chain processes together on a pipeline Chris Rebert <clp2@rebertia.com> - 2011-06-27 23:52 -0700

#8525 — Re: Trying to chain processes together on a pipeline

FromChris Rebert <clp2@rebertia.com>
Date2011-06-27 23:52 -0700
SubjectRe: Trying to chain processes together on a pipeline
Message-ID<mailman.472.1309243951.1164.python-list@python.org>
On Mon, Jun 27, 2011 at 11:47 PM, Andrew Berg <bahamutzero8825@gmail.com> wrote:
> On 2011.06.28 01:32 AM, Peter Otten wrote:
>> >>> subprocess.call(["ls"], stdout=open(os.devnull, "w"))
>> 0
> D'oh! Not sure why I was thinking os.devnull was a file object. :-[

On the bright side, I think in part due to this /exact/
misunderstanding, in bleeding-edge Python v3.3 you can now write:
>>> subprocess.call(["ls"], stdout=subprocess.DEVNULL)

http://docs.python.org/dev/library/subprocess.html#subprocess.DEVNULL

Cheers,
Chris

[toc] | [standalone]


Back to top | Article view | comp.lang.python


csiph-web