Block and continue question

vykron at my-deja.com vykron at my-deja.com
Wed Nov 24 02:32:08 CET 1999


I've embedded Python within my c++ app.  I've
been looking through the
Python API and am unsure of the easiest way to
implement block and continue.
I would like to write functions of the form:

somemodule.WaitForEvent();

WaitForEvent() would call a relevent C function
to register the waited for
event.  When the script reaches the above line
the interpreter would exit
and my main application would continue as normal
until the specified event
occured.  When the event occurs I would like my C
code to reenter the Python
interpreter at the appropriate line.

What is the most elegant way to do this within
Python?

thanx.
Kelvin McDowell
kelvinm at relic.spam.spam.spam.chips.com


Sent via Deja.com http://www.deja.com/
Before you buy.




More information about the Python-list mailing list