Problem with byte-compiled code

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • eXt

    #1

    Problem with byte-compiled code

    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& createTaskSched uler(int threadCnt, const char* logfile){
    //print("createTa skScheduler");
    TaskScheduler:: initialize(thre adCnt,logfile);
    return TaskScheduler:: singleton();
    }

    Boost exporting:

    def("createTask Scheduler", createTaskSched uler,
    return_value_po licy<reference_ existing_object >());

    Python code:

    ts = Core.createTask Scheduler(1,'')

Working...