Python 2.4/2.5 hang on bad reference?

C

Christian Convey

Has anyone seen the following?

I've got a somewhat complicated program that includes pygtk, some C/C++
code, and lots of Python code.

My problem is that when some code tries to use a global variable that
hasn't yet been created, or tries to invoke a method/function that
doesn't exist in another module, the entire python program hangs. Ctrl-C
doesn't kill it; I need to whack it from another terminal using the kill
command.

Using print statements, it basically looks like execution of the Python
interpreter simply hangs when it goes to the problem statement.

The code involved is straight, single-threaded Python code. The code is
running on the Gtk's event-handling thread.


I'm using a clean install of Ubuntu 6.10, and I see the same problem in
both 2.4 and 2.5.

I've tried wrapping the offending code with a try/catch block, so that
in case there's an exception it will get printed to stdout, but as far
as I can tell my exception handler is never getting invoked. (Perhaps
I'm accidentally crafting my "except" statements too narrowly?)

Any ideas?

Thanks very much,
Christian

--
Christian Convey
Computer Scientist,
Naval Undersea Warfare Centers
Newport, RI
(401) 832-6824
(e-mail address removed)
 

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

No members online now.

Forum statistics

Threads
473,967
Messages
2,570,148
Members
46,694
Latest member
LetaCadwal

Latest Threads

Top