Re: [C++-sig] Mapping RAW memory data into Python

2010-10-28 Thread Marek Denis
W dniu 27.10.2010 17:30, Marek pisze: http://docs.python.org/release/2.5.4/lib/typesseq.html Yeah, Buffers (and especially API/C Buffer and MemoryView functions) vere what i was looking for. Thanks again! http://docs.python.org/c-api/buffer.html?highlight=buffer#PyBuffer_FromMemory/ --

[C++-sig] Mapping RAW memory data into Python

2010-10-25 Thread Marek Denis
uld work? BTW. Suppose I had char* txt = "some string"; How do i create boost::python::object() that would containt the whole string? Passing *txt or txt into boost::python::object(*txt) didn't work. -- regards Marek Denis ___ Cplusplus-s

Re: [C++-sig] shared_ptr and register_ptr_to_python

2010-10-25 Thread Marek Denis
e in Python and you wrote that the objects (A,B) need to be instantiated under Python...This time it's more like bad Queue.Queue implementation, not boost.python (as CallPolicies don't work). Anyway, thank you for you help, I appreciate... -- pozdrawiam Marek

Re: [C++-sig] shared_ptr and register_ptr_to_python

2010-10-11 Thread Marek Denis
is for returning data members of wrapped classes and other things that are owned by another existing wrapped object. Good point, thanks! -- regards Marek Denis ___ Cplusplus-sig mailing list Cplusplus-sig@python.org http://mail.python.org/mailman/listinfo/cplusplus-sig

Re: [C++-sig] shared_ptr and register_ptr_to_python

2010-10-10 Thread Marek Denis
let you know when I find somthing out. [1] http://marek.octogan.net/python/ Using raw pointers is enough in my case, shared_ptrs would be safer, as different threads may delete object. -- Marek Denis ___ Cplusplus-sig mailing list Cplusplus-sig@python.org

[C++-sig] Fwd: Re: shared_ptr and register_ptr_to_python

2010-10-10 Thread Marek Denis
rate on the object that was created in C++ module. Instead, it just operates on the copy. You shouldn't need any extra compiler flags. Just use Boost.Python the way described in the tutorial, and throw in some register_ptr_to_python invocations - that should be all you need. -- best

[C++-sig] shared_ptr and register_ptr_to_python

2010-10-09 Thread Marek Denis
. Any code snippets, suggestions? BTW. What options shall I pass to g++ in order to use shared_ptr? Thank you in advance, -- best regards Marek Denis [ma...@octogan.net] ___ Cplusplus-sig mailing list Cplusplus-sig@python.org http://mail.python.o

[C++-sig] Strange boost::python::object behaviour

2010-08-04 Thread Marek Denis
later in code, when I invoke other method, say (for tests now): #v+ void Manager::test() { callback.attr("p")(); return; } #v- I get the "segmentation fault". I should admit, that the callback variable is inside the global instance of the Manager object, none of the objects are