debugging process

J

jimbo

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.


________________________________________________
(e-mail address removed) http://www.cordiner.com
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
474,217
Messages
2,571,121
Members
47,724
Latest member
Farreach2565

Latest Threads

Top