472,378 Members | 1,229 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

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

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 1142

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

Similar topics

1
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
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
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
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
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
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
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
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
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...
2
by: Kemmylinns12 | last post by:
Blockchain technology has emerged as a transformative force in the business world, offering unprecedented opportunities for innovation and efficiency. While initially associated with cryptocurrencies...
0
by: antdb | last post by:
Ⅰ. Advantage of AntDB: hyper-convergence + streaming processing engine In the overall architecture, a new "hyper-convergence" concept was proposed, which integrated multiple engines and...
0
by: Carina712 | last post by:
Setting background colors for Excel documents can help to improve the visual appeal of the document and make it easier to read and understand. Background colors can be used to highlight important...
0
BLUEPANDA
by: BLUEPANDA | last post by:
At BluePanda Dev, we're passionate about building high-quality software and sharing our knowledge with the community. That's why we've created a SaaS starter kit that's not only easy to use but also...
0
by: Rahul1995seven | last post by:
Introduction: In the realm of programming languages, Python has emerged as a powerhouse. With its simplicity, versatility, and robustness, Python has gained popularity among beginners and experts...
2
by: Ricardo de Mila | last post by:
Dear people, good afternoon... I have a form in msAccess with lots of controls and a specific routine must be triggered if the mouse_down event happens in any control. Than I need to discover what...
1
by: Johno34 | last post by:
I have this click event on my form. It speaks to a Datasheet Subform Private Sub Command260_Click() Dim r As DAO.Recordset Set r = Form_frmABCD.Form.RecordsetClone r.MoveFirst Do If...
0
DizelArs
by: DizelArs | last post by:
Hi all) Faced with a problem, element.click() event doesn't work in Safari browser. Tried various tricks like emulating touch event through a function: let clickEvent = new Event('click', {...
0
by: F22F35 | last post by:
I am a newbie to Access (most programming for that matter). I need help in creating an Access database that keeps the history of each user in a database. For example, a user might have lesson 1 sent...

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.