E
Eric Promislow
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
=====
This is on Windows Vista. With Rails 1.2.6 there was no problem.
After
upgrading to Rails 2.0.1, the program now hangs at the call to the
wait()
command. If I manually kill the ruby.exe process, I get some of the
expected
output, but not all of it.
I can run the above command from the command-line with no problem.
The rake code that Ruby loads did change moving from 1.2.6 to 2.0.1,
but
subprocess should run the command to completion.
I'm not sure what happens yet on XP, or other platforms. I'd like to
get this
working on Vista, though. Any ideas.
Thanks,
Eric
=====
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
=====
This is on Windows Vista. With Rails 1.2.6 there was no problem.
After
upgrading to Rails 2.0.1, the program now hangs at the call to the
wait()
command. If I manually kill the ruby.exe process, I get some of the
expected
output, but not all of it.
I can run the above command from the command-line with no problem.
The rake code that Ruby loads did change moving from 1.2.6 to 2.0.1,
but
subprocess should run the command to completion.
I'm not sure what happens yet on XP, or other platforms. I'd like to
get this
working on Vista, though. Any ideas.
Thanks,
Eric