Thanks Nicolas,
I learnt a lot from your way of doing it!
Simon
On 13/01/2010 11:17, Nicolas Lelong wrote:
Simon,
it seems that I wrapped the same videoinput library you're using.
I wrapped the getPixels the following way : python script is
responsible of the memory allocation for pixels bu
Hello,
I wonder if someone could help me with a tricky conversion between c++
and python types (well, tricky for me!)
I have a c++ library that I would like to use in python via Boost::Python
One function fills a c++ unsigned char* buffer. It has two overloads:
unsigned char * getPixe
Hello,
I thought I was trying to do something simple.
While wrapping a 3rd party library, I have a c++ class with two member
function returning pointers like this:
class videoInput
{
public:
static char * getDeviceName(int deviceID);
};
and a module like this:
#include "boost//py
Hello Terry,
Try this:
.sconf_temp\conftest_4.cpp:
#define BOOST_PYTHON_DYN_LINK
#include "boost/python.hpp"
This will make boost look for shared library in the autolink feature
Si
On 06/01/2010 06:50, terry.rank...@csiro.au wrote:
I have compiled boost, and now want to use it in m
On 04/01/2010 14:02, Brian O'Kennedy wrote:
You could try this instead: (untested!)
using namespace boost::python;
tuple a = make_tuple("hello", 42);
std::cout << "Length = " << boost::python::len(a) << std::endl;
// explicit namespace not needed
Thanks, thats perfect.
Hello,
I have a simple question. How do I find out in c++ how many elements are
contained within a boost::python::tuple?
I tried this:
using namespace boost::python;
tuple a = make_tuple("hello", 42);
object b = a.attr("length"); // exception
unsigned int c = extra
Hi,
Is it possible to build boost::python modules using MSVC as opposed to bjam?
I'd like MSVC to output a pyd of course.
Thanks
Simon
___
Cplusplus-sig mailing list
Cplusplus-sig@python.org
http://mail.python.org/mailman/listinfo/cplusplus-sig
Sorry, had a typo or two:
#include "boost//any.hpp"
#include "boost//python.hpp"
#include
#include
// RakNet::GetTime for accurate millisecond timimg
#include "GetTime.h"
#include
#include
using namespace std;
void HandleBoostPythonTuple( const boost::python::tuple& b)
{
const string s =
Hi,
I can't figure why the test program is crashing. I am comparing speeds
of boost::python::tuple and boost::any as variable length application
message wrappers.
#include "boost//any.hpp"
#include "boost//python.hpp"
#include
#include
// RakN
Hi
I've got an embedded python system up and running, for evaluation purposes.
I am able to expose c++ modules to python, create c++ classes in python,
and extract and use those python types in c++! Cool!
However, what if I want to pass a c++ type to a python class? Is there
some way to covn
Hello again.
Here's the setup
#python
from hybrid import ObjectManager
om = ObjectManager()
om.PassModel()
//cpp
class Model
{
~Model()
{
printf("model go boom");
}
/* */
};
class ObjectManager
{
Model* PassModel()
{
return new Model();
};
};
Whe
Stefan Seefeld wrote:
On 06/23/2009 02:05 PM, Simon Pickles wrote:
Hello all,
Sorry to bump this, but i am still unable to resolve my problem
described below.
The problem doesn't appear to be related to boost.python, or even boost.
You may have better luck asking on a more suitable
Hello all,
Sorry to bump this, but i am still unable to resolve my problem
described below.
I have seen a 2008 thread on this:
http://archives.free.net.ph/message/20080331.203857.548691a0.ja.html
In this case it is align(8) not align(16), and the thread describes this
issue as resolved. T
th stlport?
The error message comes from Boost.Python (function.cpp I think).
It seems to me that your module is build with stlport but boost_python
is not.
HTH,
Nikolay
Simon Pickles wrote:
Hello,
Configuration:
WinXP SP3
MSVC8
Python 2.5.4
Boost 1.38
STLPort 5.2
Bullet Physics (requires
Hello,
Configuration:
WinXP SP3
MSVC8
Python 2.5.4
Boost 1.38
STLPort 5.2
Bullet Physics (requires STLPort to avoid Alignment problems)
I need to use STLPort with my c++ extension modules, due to Bullet
Physics API.
I've managed to build STLPort, rebuilt boost (bjam stllib=stlport
stage), an
Hi,
I think this is an MSVC problem caused by the bad STL implementation,
but I wondered if there was a work around.
Both my client (Win32 MSVC8) and server (ubuntu GCC 4.2.3) share the
same c++ code. It compiles and runs on GCC but fails on MSVC.
This uses the the bullet physics library an
Hi,
I have a c++ class which uses boost::thread and boost::mutex.
I cannot expose this class directly with boost::python, since mutex is
non-copyable.
so I did this:
/// C++
class ResourceManager
{};
ResourceManager* ResourceManagerFactory()
{
return new Reso
Hi,
I am trying to get a c++ pointer to a python object.
I am using DirectPython, and a function in that library, getDevice(),
"returns the address of the object" - a IDirect3DDevice9*, already
created using DirectPython code.
Using boost::python, I have an extension module function with thi
Hi,
I had a nice build system set up on my VM ubuntu 8.10 server until I
broke the VM. :) After rebuild the VM I am obviously reinstalling all
the packages.
Boost Python is causing me trouble. I built it from svn using bjam,
boost 1_40_0. I can compile my python extension without error but w
Hi,
I have an app with a python core, then c++ extension modules.
I'd like to be able to use cPickle to pack structures, especially
boost::python::tuples, in c++.
Is there a way I can expose a python module in the c++ extensions?
I thought about passing a module as an arg to a c++ function,
Hi,
I am trying to expose part of the bullet dynamics library to my python code.
I simply need to expose a few accessors of a type btVector3. This
inherits from a class which is itself derived. I seem to be struggling
to get this right.
Here is my attempt:
BOOST_PYTHON_MODULE(HybridZone)
{
Kirit Sælensminde wrote:
Simon Pickles wrote:
When I run the python program which attempts to use the library
generated by bjam, I get this:
[EMAIL PROTECTED]:~/WorkingCopies/server/trunk/hybrid_test$ python
hybridTest.py
Traceback (most recent call last):
File "hybridTest.py&quo
Hello,
I am setting up boost python on a new Ubuntu system. I thought I had
everything configured correctly, but think I may have missed a vital step.
When I run the python program which attempts to use the library
generated by bjam, I get this:
[EMAIL PROTECTED]:~/WorkingCopies/server/trun
23 matches
Mail list logo