debugging process

jimbo at cordiner.com jimbo at cordiner.com
Sat Jan 22 23:24:51 CET 2005


Hi,

I am trying to create a separate process that will launch python and 
then can be used to step through a script programmatically.

I have tried something like:

(input, output) = os.popen2(cmd="python")

Then I expected I could select over the two handles input and output, 
make sure they aren't going to block, and then be able to write python 
code to the interpreter and read it back. I intend to import a module, 
run it in the debugger with pdb.run() and the start passing debug 
commands in and read the output.

I hope that makes sense, what I am finding is that whenever I try to 
read from the output handle it blocks. My understanding was that if it 
is returned by select that it is ready for reading and won't block.

I think that this must have something to do with python expecting 
itself to by in a TTY? Can anyone give any idea of where I should be 
going with this?

Thanks,
jms.


________________________________________________
james at cordiner.com			http://www.cordiner.com




More information about the Python-list mailing list