hi,
I have a C++ application which uses embedded python interpreter with the Python C API. It can evaluate Python files and source code with PyRun_SimpleFile and PyObject_CallMethod.
Now I have a python source code which has a worked thread which subclasses threading.Thread and has a simple run re-implementation:
import time
from threading import Thread
class MyThread(Thread):
def __init__(self):
Thread.__init__(self)
def run(self):
while True:
print "running..."
time.sleep(0.2)
The problem is that the "running" is printed only once in the console.
How can I make sure that python threads keep on running parallel to my C++ applications GUI loop.
Thanks in advance,
Paul