473,382 Members | 1,445 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,382 software developers and data experts.

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
co******@npt.nuwc.navy.mil
Dec 28 '06 #1
0 823

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: omission9 | last post by:
Any advice on the following would be much appreciated. I have thrown everything I have at it and am completely stumped. I apologize for the length, I have tried to be as succint as possible. I...
13
by: Zeljko Vrba | last post by:
Now, why would I like to learn Python: because of IronPython port to CLR. Perl port to CLR doesn't seem to be coming soon. First Perl6 for Parrot has to be written, and then other backends.. ...
1
by: David Gilbert | last post by:
I'm trying to maintain the interface to KQueue for FreeBSD. At one point, the C module stores an opaque object in a C structure such that the opaque pointer can be used later by the application. ...
34
by: Blake T. Garretson | last post by:
I want to save some sensitive data (passwords, PIN numbers, etc.) to disk in a secure manner in one of my programs. What is the easiest/best way to accomplish strong file encryption in Python? ...
12
by: could ildg | last post by:
I have learned python for over a month. I heard that it was very easy to learn, but when I tried to know OO of python, I found it really weird, some expressions seem very hard to understand, and I...
8
by: Paul Cochrane | last post by:
Hi all, I've got an application that I'm writing that autogenerates python code which I then execute with exec(). I know that this is not the best way to run things, and I'm not 100% sure as to...
0
by: Jeff | last post by:
Banging my head against the wall trying to figure this out. I have a 'sometimes' hang while disposing a form which contains an ActiveX control (Flash.ocx version 7). The form's Dispose() method...
19
by: Chris Brat | last post by:
I've seen a few posts, columns and articles which state that one of the advantages of Python is that code can be developed x times faster than languages such as <<Insert popular language name...
5
by: Adam Atlas | last post by:
Does anyone know if it would be possible to create a CPython extension -- or use the ctypes module -- to access Python's own embedding API (http://docs.python.org/api/initialization.html &c.)?...
41
by: none | last post by:
Hello, IIRC, I once saw an explanation how Python doesn't have "variables" in the sense that, say, C does, and instead has bindings from names to objects. Does anyone have a link? Thanks, ...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.