I'm running python 2.5 and have bumped into an issue whereby the PIPE
in subprocess.Popen locks up after taking too many characters. I found
some documentation that discuss this problem and offers some ideas for
solutions, the best one being to pass a file object into subprocess
instead of PIPE. This will allow for much larger std output.
The problem is that, while I can pass in a tempfile.TemporaryFile() and
everything seems to go swimmingly, there doesn't seem to be anything
written to file I handed Popen.
# I understand that not everyone has nuke, but it doesn't seem to
matter what I run through it
# the result is the same.
my_cmd = '/usr/local/Nuke6.0v3/Nuke6.0 -V'
my_stderr = tempfile.TemporaryFile()
my_stdout = tempfile.TemporaryFile()
process = subprocess.Popen(my_cmd, stderr=my_stderr, stdout=my_stdout)
Any help on this issue would be awesome! thanks!
Brandon L. Harris
Grokbase › Groups › Python › python-list › November 2010