Re: How would I do a continuous write over a pipe in the following code...

2010-02-25 Thread Aahz
In article <9d0f6456-97c7-4bde-8e07-9576b02f9...@t31g2000prh.googlegroups.com>, chad wrote: > >import subprocess as s > >broadcast = s.Popen("echo test | wall", shell=True,stdout=s.PIPE) > >out = broadcast.stdout >while 1: >out >broadcast.wait() > >broadcast.stdout.close() > > >The code o

Re: How would I do a continuous write over a pipe in the following code...

2010-02-21 Thread Chris Rebert
On Sun, Feb 21, 2010 at 1:09 PM, Dennis Lee Bieber wrote: > On Sat, 20 Feb 2010 12:46:24 -0800 (PST), chad > declaimed the following in comp.lang.python: > >> Given the following >> >> #!/usr/bin/python >> >> import subprocess as s >> >> broadcast = s.Popen("echo test | wall", shell=True,stdo

How would I do a continuous write over a pipe in the following code...

2010-02-20 Thread chad
Given the following #!/usr/bin/python import subprocess as s broadcast = s.Popen("echo test | wall", shell=True,stdout=s.PIPE) out = broadcast.stdout while 1: out broadcast.wait() broadcast.stdout.close() The code only executes once. What I want to do is be able to continuously w