FAQ

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

Search Discussions

Discussion Posts

Previous

Follow ups

Related Discussions

Discussion Navigation
viewthread | post
posts ‹ prev | 2 of 4 | next ›
Discussion Overview
grouppython-list @
categoriespython
postedDec 13, '07 at 1:34a
activeDec 13, '07 at 2:26a
posts4
users2
websitepython.org

People

Translate

site design / logo © 2022 Grokbase