473,406 Members | 2,377 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,406 software developers and data experts.

Problem with byte-compiled code

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,'')

Jan 11 '07 #1
0 838

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
by: Pierre-Benoit | last post by:
Hi there, I've a strange problem with ado.net and an Access db. I need to create a little C# app that take the content of "ole object" field and then save it into a file. The problem is that...
4
by: vertigo | last post by:
Hello I have: struct packet{ byte type; /*my byte is unsigned char*/ int len; } struct packet *p = new struct packet; p->type=10; p->len=0;
5
by: bmth | last post by:
Hi all I am trying to contvert a message from my server to unicode. I initially got a base64 endoced byte message. After some debugging I saw the base64 string had "\0" in the end wich resulted...
4
by: Andreas Fredriksson | last post by:
Hi! I got a problem when I installed the SP2 for Win XP. I use Visual Studio. net 2003 to develop a C# client and a using a SQL Server 2000 on the server. Before the upgrade it worked fine and if...
26
by: Olaf Baeyens | last post by:
I am trying to port some C++ structures to C# but I have troubles with this one. Note: this is a file record, so I must keep this format. #pragma pack( push, 1 ) typedef struct { char title; ...
2
by: Li Zhang | last post by:
I have a problem with reading byte from a memory stream. Basically I want to resize a image and then store them to sql server. Here is part of the codes. every time I tried to read byte from...
8
by: intrepid_dw | last post by:
Hello, all. I've created a C# dll that contains, among other things, two functions dealing with byte arrays. The first is a function that returns a byte array, and the other is intended to...
2
by: Mad Scientist Jr | last post by:
i'm trying to read a file byte by byte (and later alter the data and write it to a 2nd file byte by byte) and running into a problem where it seems to keep reading the same byte over and over again...
1
by: Inspired | last post by:
hi.. im writing an application that uses tcpclient/tcplistener to send file via network, what im doing is dividing the file into small parts each part equals the buffer size (8192) and send the...
2
by: explode | last post by:
I made nova oledbdataadapter select update insert and delete command and connection veza. dataset is Studenti1data, I made it by the new data source wizard,and made datagridview and bindingsource...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.