473,498 Members | 1,714 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

sys.excepthook and threads

ian
Hi,

sys.excepthook don't work if an exception come in a thread...
It's normal or its a bug ? There are any tip ? look here :
http://spyced.blogspot.com/2005_06_01_archive.html

Thx
Mar 27 '07 #1
1 1916
ian schrieb:
Hi,

sys.excepthook don't work if an exception come in a thread...
It's normal or its a bug ? There are any tip ? look here :
http://spyced.blogspot.com/2005_06_01_archive.html

Thx
I think sys.excepthook is a thread local variable. This means the
variable has to be set by the thread for which it should be active.

You did set sys.excepthook in your main thread. This setting is not
propagated to your newly created thread.

This is my observation...

Peer

Apr 12 '07 #2

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

Similar topics

1
7290
by: Follower | last post by:
Hi, I've run into an issue which seems to have been discussed previously on `python-dev` but only in context of Zope3: "Fun with 2.3 shutdown" -- Tim Peters...
1
2261
by: Josh Close | last post by:
When sys.excepthook is called, type, value and traceback are passed into it. How do I get the values of traceback? I've tried printing it, but I get the memory location. I'm gussing there are...
6
4412
by: Lunchtimemama | last post by:
Yo all, I'm getting into Python for the first time and I'm really having a blast. I've hit a bit of a snag and was wondering if someone could lend some insight. Here be the code: import sys def...
1
7941
by: Jesus Rivero - (Neurogeek) | last post by:
Hello guys, I have this problem and i don't know any workarounds yet. Im implementing a DB Connection pool, which initially creates 20 connections and keep them in a dictionary. It also...
0
1087
by: Pramod TK | last post by:
Hi, Sometimes during execution of python scripts below mentioned error string is displayed on the console. "Unhandled exception in thread started by Error in sys.excepthook: Original exception...
1
2210
by: Hari Sekhon | last post by:
I've written an except hook into a script as shown below which works well for the most part and catches exceptions. import sys def myexcepthook(type,value,tb): do something ...
0
1135
by: Larry Bates | last post by:
I have some classes that trap hook sys.excepthook and log exceptions prior to the program exiting. This has proven to be an effective way to log what is going on with many of my "lights out"...
1
1806
by: Hari Sekhon | last post by:
Hi, I'm wondering if anyone can please help me on figuring out a better way of doing an excepthook. I have a script which is using an excepthook to catch any uncaught exceptions - there usually...
3
2129
by: Sami | last post by:
Hello, I am new to Python. I tried to hook my own ExceptionPrintingFunction sys.excepthook but it does not work. This is what I wrote:...
0
7125
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7002
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7165
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
7205
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
6887
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
5462
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
4910
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
4590
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3085
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?

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.