--- On Fri, 6/27/08, Tim Spens <[EMAIL PROTECTED]> wrote:
> From: Tim Spens <[EMAIL PROTECTED]>
> Subject: Re: embedding and extending python C API registering callback
> handler objects
> To: python-list@python.org, "Matimus" <[EMAIL PROTECTED]>
day, June 27, 2008, 9:03 AM
> On Jun 27, 8:22 am, Tim Spens <[EMAIL PROTECTED]>
> wrote:
> > Hello all,
> >
> > I've been trying to get an example found
> herehttp://codeidol.com/python/python3/Embedding-Python/Registering-Callb...
> > to work. Every thin
Hello all,
I've been trying to get an example found here
http://codeidol.com/python/python3/Embedding-Python/Registering-Callback-Handler-Objects/
to work. Every thing works fine except when I try to trigger an event from c
that will call a python function. Here is my test code:
//-
The following is a simple complete example using the c python api to generate
callbacks from c to python. But when I run the c code I get a segfault in
PyInt_FromLong () (see below). Most of this example code was taken from pg
1478 of the 3rd edition python o'reilly book. I cannot see what I'
COM = 0 #for COM1
BAUD = 115200
class serial_port():
def __init__(self):
self.start_time = None
self.end_time = None
self.asleep_duration = None
self.device = serial.Serial()
self.device.timeout = 1
self.device.baudrate = BAUD
self.devic
I have a c++ program running that has boost python hooks for the c++ api.
I'm running a python client that makes calls into the c++ api. The problem is
there are c++
asynchronous callbacks that need to pass information to the python client.
What I was hoping to
do is call a python function from