Code Comments

Programming Forum and web based access to our favorite programming groups.
For Programmers: Free Programming Magazines
Registration is free! Edit your profileCalendarFind other membersFrequently Asked QuestionsSearch -> 
Post New Thread











Thread
Author

debugging process
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@cordiner.com			http://www.cordiner.com


Report this thread to moderator Post Follow-up to this message
Old Post
jimbo@cordiner.com
01-23-05 01:57 AM


Re: debugging process
<jimbo@cordiner.com> wrote:
..
> 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?

http://pexpect.sourceforge.net/


Alex

Report this thread to moderator Post Follow-up to this message
Old Post
Alex Martelli
01-23-05 01:57 AM


Sponsored Links




Last Thread Next Thread Next
Search this forum -> 
Post New Thread

Python archive

Show a Printable Version Send to friend Email This Page to Someone! subscribe to this thread Receive updates to this thread
Computer Consultants
Programming Jobs
Visual Basic Controls
SQL Server Programming
Webservices
Java Security
Visual Studio
C# Programming
Visual J++
Software engineering
Open source Software
Perl Programming
PHP Programming
ASP Programming
ASP .NET Programming
Visual Basic Programming
Windows Scripting Host
Java Programming
Java Help
Java Beans
VBScript
Cobol
MAC Applications
Unix Programming
Forum Jump:
All times are GMT. The time now is 04:28 AM.

 

Programming forum archive

Copyrights CodeComments.com 2004 - 2006

Powered by vBulletin Copyright 2000-2006 Jelsoft Enterprises Limited.