943,769 Members | Top Members by Rank

Ad:
  • Python Discussion Thread
  • Unsolved
  • Views: 490
  • Python RSS
Jun 2nd, 2009
0

How to handle an aborted C function called from Python

Expand Post »
Just started working on a project that is using Python to drive C API's. When the C API's take an unhandled event they terminate using a C exit(3).

How can I monitor for these exit conditions with in my Python code and handle and process the error code used in the C functions exit?

I have searched around and tried many of the exception classes to no avail.
Similar Threads
Reputation Points: 10
Solved Threads: 0
Newbie Poster
RDCooter is offline Offline
1 posts
since Jun 2009
Jun 2nd, 2009
0

Re: How to handle an aborted C function called from Python

Reputation Points: 56
Solved Threads: 65
Posting Whiz in Training
slate is offline Offline
242 posts
since Jun 2008
Jun 2nd, 2009
0

Re: How to handle an aborted C function called from Python

If possible, set it up so you can call/execute the C functions using subprocess. See "Reading from the output of a pipe:" here http://www.doughellmann.com/PyMOTW/s...ule-subprocess
Reputation Points: 741
Solved Threads: 692
Nearly a Posting Maven
woooee is offline Offline
2,305 posts
since Dec 2006

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in Python Forum Timeline: wxPython Vertical Aligning failing
Next Thread in Python Forum Timeline: Jumble solver





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC