Help | Site Map
Connecting Tech Pros Worldwide
 
 
LinkBack Thread Tools
  #1  
Old December 28th, 2006, 06:55 PM
Christian Convey
Guest
 
Posts: n/a
Default Python 2.4/2.5 hang on bad reference?

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
conveycj@npt.nuwc.navy.mil
 

Bookmarks

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

What is Bytes?

We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights. Get the best answers to your questions from over network members.
Post your question now . . .
It's fast and it's free

Popular Articles