473,509 Members | 2,457 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Weirdness when trying to use Boost.python

I'm planning to write a large program that will have advanced scripting in
python in which the scripter will subclass c++ objects to add
functionality. this leads me to boost.python (if you dont already know
about boost.python dont bother reading farther cause its a kind of a
technical question) anyways i embeded python in a litte c++ test app i
wrote and got it working fine. eg: i could write a little python program
and my app would load and run it. then i added boost.python to expose a
sample class to the python code. i think i know how to use boost cause i
basically followed the tutorial and the code compiles fine but the module
boost is supposedly creating doesn't exist when the code (python code) is
run . now if i use just the C python API can can interface some simple
functions but not classes. there is an api which creates the module based
on a object returned from another api. Now i cant get boost to give me that
object. since there is no readily apparent way of doing this i assumed that
boost did i t automatically but this apears not to be true. Also looking at
the boost source was just more confusing. everyting uses INSANE macros
which call other macros though 50+ include files so no help there. the
boost documentation talks about exposing classes and embedding python but
not the two together. Any ideas? Oh also just FYI: I'm running XP Prof,
using VC++ 6 SP5, Python 2.3.2, and the current CVS of Boost cause the
release only supports python 2.2.x.

Jul 18 '05 #1
0 1203

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

Similar topics

1
2909
by: Bren | last post by:
Hi, Pardon my stupid, but I'm having a problem building Boost.Python as per the instructions at http://www.boost.org/libs/python/doc/building.html I got boost-build-2.0-m6.zip from...
2
3085
by: Stephen Horne | last post by:
I started making up a Python extension module to wrap a C++ library of mine using Boost Python. Trouble is, the library has a number of classes each of which has a lot of methods. I seem to have...
0
2116
by: Li Daobing | last post by:
I can't use .def(str(self)) I write a simple example, without `str', I can build it well, but with this one, I can't build //Rational.cpp #include <boost/python.hpp> #include <iostream> ...
4
1353
by: steve | last post by:
In a nutshell, my problem is that I am getting this runtime error, and I have no clue why. Please bear in mind its my first python program: "localvariable 'currentAbility' referenced before...
0
1919
by: Andrew Ayre | last post by:
Hi, I can't seem to get the library built, and any help is greatly appreciated. Here is the info: Windows XP Borland C++ Builder 5 Latest Boost source code (downloaded at the weekend) Windows...
3
5614
by: TonyHa | last post by:
Hello I try to install boost_1_33_1 on RedHat Linux. I have downloaded boost into /user/dtgtools/tmp and I try to install it into /user/dtgtools/packages/boost. I use the following commands:...
11
4886
by: Osiris | last post by:
I have these pieces of C-code (NOT C++ !!) I want to call from Python. I found Boost. I have MS Visual Studio 2005 with C++. is this the idea: I write the following C source file:...
0
4595
by: devito | last post by:
hi there, for some days i try to build the boost.python tutorial "hello world" without bjam on winxp by using mingw. so i wrote a *.bat-file like the following: // --- snip...
2
2358
by: JYA | last post by:
Hi. I was writing an xmltv parser using python when I faced some weirdness that I couldn't explain. What I'm doing, is read an xml file, create another dom object and copy the element from...
0
7135
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
7342
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,...
1
7067
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
7505
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
5650
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
4729
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3201
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1570
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
0
440
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

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.