Hello,
I've compiled the example code for Boost.Python:
#include
char const* greet()
{
return "hello, world";
}
BOOST_PYTHON_MODULE(hello_ext)
{
using namespace boost::python;
def("greet", greet);
}
It compiles and I got an BoostPythonTest.dylib produced by Xcode. I've
tri
Hello,
I need som help.
I'm building boost on my Mac OSX 10.8 using the bjam build system.
I have installed Python 3.3 seperatly aas it doesn't ship with the Mac. So
I have my project-config.jam file like:
# Boost.Build Configuration
# Automatically generated by bootstrap.sh
import option ;
im
I wrap my c++ vector like:
class_("GameObjectList")
.def(vector_index_suite);
When I run the following in python:
objects = gameobject_manager.getGameObjects() # getGameObjects is returning
a std::vector
for object in objects:
...
I get the error
> TypeError: No to_python (by-value) converter
>From my research it seems not very trivial to wrap std::vector that holds
pointer types. For example:
std::vector
I've looked at boost python vector_index_suite but it just gives me the
runtime error:
> TypeError: No to_python (by-value) converter found for C++ type:
> GameObject*
I have a
Hi,
I want to export my c++ class and make an instance of it and then expose it
to python as if it were a python module. Is it possible?
// export and create instance
class_ [...];
namespace["instance"] = ptr( instanceOfMyClass );
Then in python:
import instance
instance.someFunction()
Thank
26, 2010 at 11:29 PM, Simon W wrote:
> Of course, I did find another reference that I didn't notice. Python
> reference works as expected .. hehe!
>
>
> On Mon, Oct 25, 2010 at 7:35 PM, Simon W wrote:
>
>> Hey again,
>>
>> I'm trying to implement
Of course, I did find another reference that I didn't notice. Python
reference works as expected .. hehe!
On Mon, Oct 25, 2010 at 7:35 PM, Simon W wrote:
> Hey again,
>
> I'm trying to implement a load / unload module functionallity. When I
> delete the module in the __ma
Hey again,
I'm trying to implement a load / unload module functionallity. When I delete
the module in the __main__ dict the module's reference count is still > 1.
I've been trying to find if I reference it anywhere else in my code but I
can't find anything! When I did a check in vc++ debugger foun
Thanks that did the trick!
On Mon, Oct 25, 2010 at 7:07 PM, Ralf W. Grosse-Kunstleve wrote:
> Oh, at second glance...
>
>
>
> > > object obj = mMainNamespace[ name.c_str() ];
> > >obj.del();
>
> This cannot work!
> You need to do it the way I showed before.
>
> mMainNames
Hey and thanks for the answer! Unfortunately that doesn't seem to work. I'm
using boost.python for Python 3 ( boost python 1.44? )
error C2039: 'del' : is not a member of 'boost::python::api::object'
I've had a look on the reference manual but I don't understand if it's a
free function or an meth
Hey,
I have a dict of the main namespace in boost::python. Now I want to delete
an object from the dict to unload/delete that object
dict namespace = .. extract dict from __main__ module ...;
namespace["test"] = object(555);
namespace.remove("test"); // <- how can I do something like this with b
onents[gameobj]))
return 0
def deserialise(self, gameobj, data):
pass
On Wed, Sep 29, 2010 at 4:02 PM, Jakub Zytka wrote:
> On 09/29/10 14:11, Simon W wrote:
>
>> Thank you for the answer. Is there any way I can prevent it from copying
>> the
>> strea
Thank you for the answer. Is there any way I can prevent it from copying the
stream object even though std::ostream::write() returns a std::ostream& ?
On Wed, Sep 29, 2010 at 11:38 AM, Jakub Zytka wrote:
>
> > I get this error:
> > *TypeError: No to_python (by-value) converter found for C++ type
Hey,
I'm trying to serialise some data. I have a c++ class:
class ostream
{
std::ostream& stream;
public:
ostream(std::ostream& s) : stream(s) {}
void write(const char* bytes, Uint32 count)
{
stream.write(byte
Hi,
Im trying to expose limited parts of std::ostream like this:
{
class_("iosbase", init())
;
class_,
boost::noncopyable>("ios", init())
;
std::ostream&(std::ostream::*write)(const char*,
std::streamsize) = &std::ostream
key being used,
i.e. keep the key as a pointer.
On Fri, Sep 24, 2010 at 4:27 PM, Stefan Seefeld wrote:
> Simon,
>
> I don't quite understand what you are trying to do. Please provide a little
> more detail. Your current mail requires far too much second-guessing to be
> usefu
Hi,
Im really scared because I fear a fundamental issue concerning the script
system in my game engine.
In C++, I have a class. In my class I map data to GameObject like:
*class
{
map .
}*
As you see, I use the pointer as key.
When I from c++, in the same class, call a python function
17 matches
Mail list logo