473,486 Members | 1,984 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

tracebacks in embedded python

When I embed Python into C there is no traceback message on the screen
after an uncaught exception. Using sys.exc_info() I can print may own
traceback but I would need to insert try except statements at
different places. Is there a way to "turn on" traceback writing to
std.err (that also shows up at the screen)?

Thanks

Mike
Jul 18 '05 #1
1 1828
mm******@dgfz.de (Mike Müller) writes:
When I embed Python into C there is no traceback message on the screen
after an uncaught exception. Using sys.exc_info() I can print may own
traceback but I would need to insert try except statements at
different places. Is there a way to "turn on" traceback writing to
std.err (that also shows up at the screen)?


You should check the return value of the Python API call for failure.
Most functions return NULL or -1 on error.
Then you call PyErr_Print().

Thomas
Jul 18 '05 #2

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

Similar topics

12
3060
by: Brandon | last post by:
Java seems to have taken off as the platform and language of choice for many embedded devices. Would it be feasible for Python(perhaps running on an embedded version of Linux) to act in such a...
13
2773
by: Alexander May | last post by:
Hi, I love Python! I've been using it for a couple of years now and have found it to be a highly productive language. I evangelize it to my developer friends and am probably responsible for...
7
1774
by: Maxwell Hammer | last post by:
Hi all, This is related to an earlier post 'Help with thread related tracebacks'...for which I have had no feedback yet :-( How should a thread complete i.e. how should it exit? Reading the...
3
3046
by: Godzilla | last post by:
Has anyone install Python on Windows XP Embedded? We wish to evaluate the possible solution of installing Python with WinXPE on a PC/104 plus module. Thank you.
20
22467
by: Jack | last post by:
Is there a Python packaging that is specifically for embedded systems? ie, very small and configurable so the user gets to select what modules to install? For Linux-based embedded systems in...
0
1055
by: Nathan | last post by:
Hi folks! Throughout my python development career, I've occasionally made various developer tools to show more information about assertions or exceptions with less hassle to the programmer. ...
5
1317
by: George Sakkis | last post by:
I'm reading the docs on sys.exc_info() but I can't tell for sure whether I'm using it safely to get a snapshot of an exception and reraise it later. The use case is a class which acts like a...
4
9791
by: Steven D'Aprano | last post by:
I'm writing a command-line application that is meant to be relatively user friendly to non-technical users. (Some wags might like to say that "user friendly" and "command-line application" are,...
4
2810
by: Chris8Boyd | last post by:
I am embedding Python in a MSVC++ (2005) application. The application creates some environment and then launches a Python script that will call some functions exported from the MSVC++ application....
0
6964
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
7123
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,...
1
6842
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
7319
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
1
4864
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
4559
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
3069
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
3070
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
262
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

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.