Terminal "hang up" problem

Bengt Richter bokr at oz.net
Tue Dec 16 01:21:54 EST 2003


On Mon, 15 Dec 2003 16:07:31 -0800, JD <lists at webcrunchers.com> wrote:

>What is the best way to debug a Python program if when i run it,   it 
>totally hangs up the
>terminal console.
>
>Control-c or control-d has NO effect,  so it's hung up somewhere,  but 
>we have no idea
>where.
>
>We are using Python 2.3,  on an openBSD box,  running the python script 
>from the shell.
>
>Is it possible to somehow find out what is making it hang up?
>
have you tried gdb python and then run with your_python_prog.py as the arg?
If gdb will catch a ctl-c then you might be able to use bt to get a backtrace?
(I don't really know much about gdb, but someone here has probably done this
and can tell you the right way to do it ;-)

Of course, there's the lions-in-africa thing of putting print statements to
narrow down successively the area where it could be hanging ;-)

Regards,
Bengt Richter




More information about the Python-list mailing list