Hi
Mikael Lind
Check:
http://www.boost.org/doc/libs/1_43_0/libs/python/doc/v2/with_custodian_and_ward.html#with_custodian_and_ward-spec,
if this not work to your problem this can help you to implement a new
policy.
BR
Renato Araujo Oliveira Filho
On Fri, Jul 9, 2010 at 5:05 AM, Mikael Lind
Remember of use PyEval_InitThreads on your module initialization.
Renato Araujo Oliveira Filho
On Tue, Feb 2, 2010 at 2:30 PM, Matthew Scouten (TT) <
matthew.scou...@tradingtechnologies.com> wrote:
> First of all, the PyGILState_* functions are acquiring and releasing the
n can produce some new bytes. :(
Renato Araujo Oliveira Filho
On Tue, Dec 22, 2009 at 12:42 AM, Troy D. Straszheim
wrote:
> Dane Springmeyer writes:
>
>> Troy,
>>
>> Incidentally, do you know the proper way (or is there a proper way?)
>> to support None t
Hi thanks for you help,
On Wed, Jan 6, 2010 at 4:59 AM, Hans Meine wrote:
> On Dienstag 05 Januar 2010, Renato Araujo wrote:
>> I would like to know if is possible to avoid this level of conversion
>> and tell to boost.python only try the direct conversion,
>
> Not as far as
def("value", value);
class_("X",
init())
;
class_("Y",
init())
;
implicitly_convertible();
implicitly_convertible();
}
---
BR
Renato Araujo Oliveira Filho
__
Hi,
Try use this flag in your compilation, -DBOOST_PYTHON_MAX_ARITY=XX
The default value is 15, the I think thi can solve your problem.
BR
Renato Araujo Oliveira Filho
On Mon, Oct 26, 2009 at 2:01 PM, Eilif Mueller wrote:
> Hi,
>
> Wrapping a function f with 16 arguments:
>
&g
pointer to most-derived type and use this
as key in my hash table.
BR
Renato Araujo Oliveira Filho
2009/9/29 Pertti Kellomäki :
> I have Python bindings for a C++ library that among other
> things contains classes for describing the static structure
> of a microprocessor.
>
> My b
Hi Jean,
You can use "boost::python::ptr(your_cpp_cpointer)" this avoid create
unecessary copies.
BR
Renato Araujo Oliveira Filho
On Tue, Sep 8, 2009 at 11:41 PM, Jean-Sébastien Guay
wrote:
> Hi all,
>
> I found an post from earlier this year to this list where Da
Congratulations, I will wait for get this merged in mainline for start
some work in PySide.
Renato Araujo Oliveira Filho
On Tue, Sep 1, 2009 at 1:19 AM, Haoyu Bai wrote:
> Hi,
>
> As GSoC is officially finished, this is the final report of the
> Boost.Python py3k(Python 3) sup
o::bar) to add_property("bar",
setter_property_bar).
I will try find the problem in boost source but for now this change
can solve the problem.
BR
Renato Araujo Oliveira Filho
On Sun, Aug 30, 2009 at 4:40 AM, VáclavŠmilauer wrote:
> Such is the shortest example I am able to isolate
s the pointer address to
another region of memory, causing a mess in my hash. I would like to
know if someone has any idea about how to solve this problem. How can
I map a c++ pointer to a PyObject between libraries without use
dynamic_cast.
I have attached a small use case for this case.
Renato A
Hi,
The PySide team is pleased to announce the first public release of
PySide: Python for Qt!
PySide, its documentation, and developer resources are available at the
project website, http://www.pyside.org .
What is it?
---
PySide is a project providing an LGPL'd set of Python bindings f
<<<<<<<<<<<<<< here this need
be called explicitly
> self.handle_type = 2
> def canHandle(self, type):
> return type == handle_type
> def handle(self):
> print "handle() from python plugin"
BR
gt; ___
> Cplusplus-sig mailing list
> Cplusplus-sig@python.org
> http://mail.python.org/mailman/listinfo/cplusplus-sig
> ___
> Cplusplus-sig mailing list
> Cplusplus-sig@python.org
> http://mail.python.org/mailman/listinfo/cplusplus-sig
>
--
Renato Araujo Oliveira Filho
___
Cplusplus-sig mailing list
Cplusplus-sig@python.org
http://mail.python.org/mailman/listinfo/cplusplus-sig
e thread_;
> }
> }
>
> virtual void onTick() { get_override("onTick")(); }
> void default_onTick() {}
> };
>
> BOOST_PYTHON_MODULE(tick)
> {
> class_ ("Ticker")
> .def("run", &Ticker::run)
>
;::maybe_register_pointer_to_python(void*,
> void*, mpl_::bool_<1>*)".
>
> I also tried extending the boost::python::wrapper using get_override()
> instead of call_method(), but as it can not be constructed with a
> PyObject * so th
t; ___
> Cplusplus-sig mailing list
> Cplusplus-sig@python.org
> http://mail.python.org/mailman/listinfo/cplusplus-sig
>
--
Renato Araujo Oliveira Filho
___
Cplusplus-sig mailing list
Cplusplus-sig@python.org
http://mail.python.org/mailman/listinfo/cplusplus-sig
fe77ef14), at 0xfee15ca0
>
>
>
> "Paul Scruby" wrote in message
> news:h2sgic$ad...@ger.gmane.org...
>> Hiya,
>>
>> That's fantastic, all I needed to do was to put PyGILState_Ensure();
>> before my virtual function calls into python from another
o make it in one operation.
> Thanks
>
> Alexey
>
> _______
> Cplusplus-sig mailing list
> Cplusplus-sig@python.org
> http://mail.python.org/mailman/listinfo/cplusplus-sig
>
--
Renato Araujo Oliveira Filho
___
Cplusplus-sig mailing list
Cplusplus-sig@python.org
http://mail.python.org/mailman/listinfo/cplusplus-sig
gt; msvcr90d.dll!_callthreadstartex() Line 348 + 0xf bytes C
> msvcr90d.dll!_threadstartex(void * ptd=0x00d46938) Line 331 C
> kernel32.dll!7c80b729()
>
>
> Have a missed a trick using the wrapper, or does boost::python not support
> threading?
>
> Many thanks,
>
> Paul
>
>
>
> ___
> Cplusplus-sig mailing list
> Cplusplus-sig@python.org
> http://mail.python.org/mailman/listinfo/cplusplus-sig
> ___
> Cplusplus-sig mailing list
> Cplusplus-sig@python.org
> http://mail.python.org/mailman/listinfo/cplusplus-sig
> ___
> Cplusplus-sig mailing list
> Cplusplus-sig@python.org
> http://mail.python.org/mailman/listinfo/cplusplus-sig
>
--
Renato Araujo Oliveira Filho
___
Cplusplus-sig mailing list
Cplusplus-sig@python.org
http://mail.python.org/mailman/listinfo/cplusplus-sig
> ArgumentError Traceback (most recent call last)
>
> /home/.../build/ in ()
>
> ArgumentError: Python argument types in
> Test.testArgument(Test, str)
> did not match C++ signature:
> testArgument(Test {lvalue}, wchar_t*)
>
>>
Any thoughts?
>
>
> Thanks in advance!
>
> --
> Nicolas Lara
> Linux user #380134
> http://nicolas-lara.blogspot.com/
> Public key id: 0x152e7713 at http://subkeys.pgp.net/
> ___
> Cplusplus-sig mailing list
> Cplusplus-sig@python.org
> http://mail.python.org/mailman/listinfo/cplusplus-sig
>
--
Renato Araujo Oliveira Filho
___
Cplusplus-sig mailing list
Cplusplus-sig@python.org
http://mail.python.org/mailman/listinfo/cplusplus-sig
peError: No Python class registered for C++ class class ResourceManager
>
> #
>
> Am I doing this wrong? Wrong return policy?
>
> Thanks
>
> Simon
>
>
> _______
> Cplu
;
>
> BOOST_PYTHON_MODULE(test)
> {
> using namespace boost::python;
>
> class_("test")
> .def("get", &test::get);
> }
>
> Thanks
>
> ___
> Cplusplus-sig mailing list
> Cplusplus-sig@py
c
print t == c
this happen when I use "Other" object in "setChild" and "child"
function. when I use "Base" object works fine.
I put a small example annexed in this e-mail.
--
BR
Renato Araujo Oliveira Filho
boosttest.tar.gz
Description: GNU Zip compres
g like this(pseudocode):
> class A { object _self; };
>
> if (a->_self == 0)
> a->_self = makePyObjectForExistingClass(this)
> return _self
>
>
> and this PyObject should be deleted automatically when object will die in
> C++
>
>
>
>
mething",&Derived::setSomething,
> return_value_policy())
> //.def("setSomething",&Derived::setSomething,
> return_value_policy());
> }
>
> ___
> Cplusplus-sig mailing list
> Cplusplus-sig@python.org
> http://mail.python.org/mailman/listinfo/cplusplus-sig
>
--
Renato Araujo Oliveira Filho
___
Cplusplus-sig mailing list
Cplusplus-sig@python.org
http://mail.python.org/mailman/listinfo/cplusplus-sig
test.
My question is, how export this protected virtual function? the way
used in Py++ not work in this case.
Thanks
On Mon, Mar 23, 2009 at 5:57 AM, Roman Yakovenko
wrote:
> 2009/3/19 Renato Araujo :
>> Hi guys, I'm working again in my bindings generation and I get a new
>> qu
For more details about the problem, I found the correct header witch
give me this problem, and isolate that with this:
#include
# include
# include
#pragma GCC visibility push(default)
#include
#pragma GCC visibility pop
#include
BR
Renato
On Sun, Mar 22, 2009 at 12:36 PM, Renato Araujo
y pop
#include
You can try this only changing the "foo/python_headers.h" file in my
previous example.
I don't know if this is the correct way to fix this. Someone can talk about?
BR
On Sat, Mar 21, 2009 at 5:38 PM, Niall Douglas
wrote:
> On 20 Mar 2009 at 13:46, Renato Ar
test to show the problem. This flags is very
important for me because I got size reduction about 50% with this.
Thanks
--
Renato Araujo Oliveira Filho
boosttest_visibility.tar
Description: Unix tar archive
___
Cplusplus-sig mailing list
Cplu
all cases.
I have attached the test case on this e-mail, if someone would like to
try my implementation.
BR
--
Renato Araujo Oliveira Filho
boosttest.tar
Description: Unix tar archive
___
Cplusplus-sig mailing list
Cplusplus-sig@pytho
;
> #endif //DERIVED_BAR_H
>
> Bar.cpp
> #include
> #include "Bar.h"
>
> using namespace Derived;
>
> Bar::Bar() : Base::Foo()
> {
> };
>
> Bar::~Bar()
> {
> };
>
> void Bar::sayHello()
> {
> std::cout << "Hi I am Bar!" << std:: endl;
> }
>
> BarWrapper.cpp
> #include
> #include
>
some idea how solve this, or a another
way to save
some calls of ".def" functions.
--
Renato Araujo Oliveira Filho
testboost.tar
Description: Unix tar archive
___
Cplusplus-sig mailing list
Cplusplus-sig@python.org
http://mail.python.org/mailman/listinfo/cplusplus-sig
anks.
On Mon, Jan 26, 2009 at 8:06 PM, Ralf W. Grosse-Kunstleve
wrote:
> Are you wrapping many trivial (member) functions?
>
>
>
> - Original Message
> From: Renato Araujo
> To: Development of Python/C++ integration
> Sent: Monday, January 26, 2009 6:16:59 AM
&
my bindings.
>
> Cheers,
> Niall
>
> On 23 Jan 2009 at 15:51, Renato Araujo wrote:
>
>> hi David,
>>
>> This size is about my library, when I use "class_" and ".def()"
>> templates from libboost_python. And about the g++ flags I use -Os
>>
Thanks
On Fri, Jan 23, 2009 at 2:43 PM, David Abrahams wrote:
>
> on Fri Jan 23 2009, Renato Araujo wrote:
>
>> I'm current using "CXXFLAGS=-ffunction-sections -Os" and "LDFLAGS
>> --gc-sections", and the library already striped, without strip the
I'm current using "CXXFLAGS=-ffunction-sections -Os" and "LDFLAGS
--gc-sections", and the library already striped, without strip the
size is about 12MB.
On Fri, Jan 23, 2009 at 1:31 PM, David Abrahams wrote:
>
> on Fri Jan 23 2009, Renato Araujo wrote:
>
>&
all instead of ".def" functions, to minimize
template usage,
or some template call that I can transform into a function call.
Anyway if there is work in progress to minimize the size of
boost-python bindings
I am very eager to help.
BR
-
it
from "python::wrapper". Then I think all classes have implicit
conversion to "shared_ptr" correct?
BR
--
Renato Araujo Oliveira Filho
___
Cplusplus-sig mailing list
Cplusplus-sig@python.org
http://mail.python.org/mailman/listinfo/cplusplus-sig
t no have parent.
On Fri, Dec 12, 2008 at 8:08 PM, David Abrahams wrote:
>
> on Fri Dec 12 2008, "Renato Araujo" wrote:
>
>> Hi guys,
>>
>> I'm creating a 2 new call_policy to my functions where I need take and
>> give back the ownership of my obje
this? How I can get a ref to auto_ptr or shared_ptr from
my PyObject?
Thanks
--
Renato Araujo Oliveira Filho
___
Cplusplus-sig mailing list
Cplusplus-sig@python.org
http://mail.python.org/mailman/listinfo/cplusplus-sig
rence the same
> C++ instance I can't use id() or repr() of the Python object.
>
> Thanks,
> Paul
>
> ___
> Cplusplus-sig mailing list
> Cplusplus-sig@python.org
> http://mail.python.org/mailman
, Dec 3, 2008 at 4:16 PM, Stefan Seefeld <[EMAIL PROTECTED]> wrote:
> Renato Araujo wrote:
>>
>> Hi all,
>>
>> I'm trying check if have someone using my object in python, but I got
>> some problems I think I'm not doing this in the correct way:
e best way to do this?
Thanks
--
Renato Araujo Oliveira Filho
___
Cplusplus-sig mailing list
Cplusplus-sig@python.org
http://mail.python.org/mailman/listinfo/cplusplus-sig
l/temporary/boost_1_37_0/boost/python/object/value_holder.hpp: In
> constructor
> 'boost::python::objects::value_holder::value_holder(PyObject*, A0)
> [with A0 = boost::reference_wrapper, Value = B]':
> /home/mihail/temporary/boost_1_37_0/boost/python/object/value_holder.hpp
y, but both give compilation errors.
>
> Any help is appreciated
>
> regards,
> anirudh
>
> ___
> Cplusplus-sig mailing list
> Cplusplus-sig@python.org
> http://mail.python.org/mailman/listinfo/cplusplus-sig
>
--
Renato Araujo Oliveira Filho
___
Cplusplus-sig mailing list
Cplusplus-sig@python.org
http://mail.python.org/mailman/listinfo/cplusplus-sig
ng more generic where I can declare in class_
template, something like that:
class_ ("MyObject")
...
There is something like that? How is the best way to do this?
BR
--
Renato Araujo Oliveira Filho
___
Cplusplus-sig mailing l
et <[EMAIL PROTECTED]>
>
> ___
> Cplusplus-sig mailing list
> Cplusplus-sig@python.org
> http://mail.python.org/mailman/listinfo/cplusplus-sig
>
--
Renato Araujo Oliveira Filho
___
Cplusplus-sig mailing list
Cplusplus-sig@python.org
http://mail.python.org/mailman/listinfo/cplusplus-sig
> Reclaim your name @ymail.com or @rocketmail.com. Get your new email address
> now! Go to http://ca.promos.yahoo.com/jacko/
> ___
> Cplusplus-sig mailing list
> Cplusplus-sig@python.org
> http://mail.p
wrote:
> Renato Araujo wrote:
>>
>> Hi all,
>>
>> Is possible in boost::python create a exception when the c++ object is
>> deleted internal, and you try use the python object. Because here I
>> got a core when I try do this.
>>
>
> I'm not sure
Hi all,
Is possible in boost::python create a exception when the c++ object is
deleted internal, and you try use the python object. Because here I
got a core when I try do this.
BR
--
Renato Araujo Oliveira Filho
___
Cplusplus-sig mailing list
Hi Luciano
You can use in your class definition something like that:
class_
but I don't know why this not work when you have custom constructors like that:
class_ ("MyClass", python::no_init)
.def("__init__", python::make_constructor(my_constructor))
BR
Renato
On Tue, Nov 4, 2008 a
oost_python-py25.so.1.35.0)
I think there is a way to communicate to boost to remove my objet form
your object list. How I can do this?
This is the correct way?? Have a best boost way to do this??
BR
--
Renato Araujo Oliveira Filho
On Mon, Nov 3, 2008 at 4:15 PM, Renato Araujo <[EMAIL PRO
Sorry my last message I sent incomplete :)
I will try again.
First I have a c++ class like this:
struct object
{
object(object *parent=0) // if parent !=NULL append this at
parent children list
~object() //Destroy all children
};
Is possible implement this using "python::with_custo
;?
I tried some like that:
qclass_ ("object", python::init<> ())
//here i put self will be the ward and arg 2 (parent) will be the
custodian or
.def(python::init()[python::with_custodian_and_ward_postcall<2,1>()])
On Mon, Nov 3, 2008 at 12:48 PM, Renato Araujo
t this not compile, because the "with_custodian_and_ward" need a
function with 2 args like (self, parent) how can I solve this problem?
--
Renato Araujo Oliveira Filho
___
Cplusplus-sig mailing list
Cplusplus-sig@python.org
http://mail.python.org/mailman/listinfo/cplusplus-sig
usplus-sig
>
>
>
> __
> Yahoo! Canada Toolbar: Search from anywhere on the web, and bookmark your
> favourite sites. Download it now at
> http://ca.toolbar.yahoo.com.
>
58 matches
Mail list logo