Problem with byte-compiled code

E

eXt

Hi, I have built some modules in C++to extend python. At first
everything worked but then I began splitting my python code into
several modules. The application begins in main.py and then imports my
other modules.

The first time I run the application it works, but when python imports
the byte compiled module all I get is a blank window. Moving back all
the code into the same source file works.

I have found that removing a call to a C++ function solves the problem.
However that function is needed and I found that if I print anything
inside that function it works. It isn't time related since I tried to
sleep instead but that didn't work either.

I'm not sure if this is the correct list but I hope someone can help me
a bit.

The C++ function:

TaskScheduler& createTaskScheduler(int threadCnt, const char* logfile){
//print("createTaskScheduler");
TaskScheduler::initialize(threadCnt,logfile);
return TaskScheduler::singleton();
}

Boost exporting:

def("createTaskScheduler", createTaskScheduler,
return_value_policy<reference_existing_object>());

Python code:

ts = Core.createTaskScheduler(1,'')
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,055
Latest member
SlimSparkKetoACVReview

Latest Threads

Top