Eric Promislow wrote:
> Here's a small Python program I use to grab the output from rake:
> 
> =====
> 
> from subprocess import Popen, PIPE
> 
> p = Popen(args='c:\\ruby\\bin\\ruby.exe c:\\ruby\\bin\\rake -T',
>           cwd=u'c:\\Users\\ericp\\testing\\file07',
>           shell=True,
>           stdin=None,
>           stderr=PIPE,
>           stdout=PIPE,
>           creationflags=0x8000000
>           );
> p.wait()
> data = p.stdout.read()
> print data

Your usage of wait() is dangerous. The code can block indefinitely when
the stdout or stderr buffer is full.

Christian
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to