Hi,
I need help with a crash I observe both on windows and Linux. I admit my use
case is somewhat complicated, but that's reality. So, my problem consists form 3
components. Let's call them A, B, and C:
A is Python *extension* library (dll/so). This is really just an infrastructure
layer which he
Hi,
Is there any way to intercept uncaught exception in embedded Python code?
I need to add some information to an exception/traceback in this case. I have
full control over environment before embedded code is executed.
I thought I'll be able to use sys.excepthook, but it does not seem to be
in
I've got exported class A and I'd like to avoid reporting private methods when
users type help (mymodule.A). Is there anything like __all__ for modules? naming
these methods starting with _ does not help either.
Please advise,
Gennadiy
___
Cplusplus-si
Jim Bosch gmail.com> writes:
>
> On Fri, 2010-03-19 at 19:55 +, Gennadiy Rozental wrote:
> > I am doing something like this in export part of mymodule:
> >
> > scope S = class_("X", no_init );
> >
> > class_( "Y",... )
I am doing something like this in export part of mymodule:
scope S = class_("X", no_init );
class_( "Y",... )
...
;
In Python I do see mymodule.X.Y, but mymodule.X.Y.__name__ is 'mymodule.Y'
Gennadiy
___
Cplusplus-sig mailing list
Cplusplus-sig@pytho
How do I provide doc string to the property like this:
...
.add_property( "goo", make_function(...) )
While we are at it, how do I provide docstring and arg names to the operators:
...
.def( self < self )
Gennadiy
___
Cplusplus-sig mailing lis
I've got specification like this:
class_( "Foo", "Foo descr" )
.def( "__init__", bp::make_constructor( &make_foo ),
bp::args( "self", "str" ),
"Constructor based on string representation.\n" )
...
I am getting compilation error below from VC9.0. Error disappears i
Hi,
Let's say I have string literal as static C++ class member:
string Foo::abc = "ABC";
I'm exporting the class Foo. I'd like to export Foo::abc as well and be able to
access it on Python side using similar interface: Foo.abc.
Can I do this using Boost.Python?
Gennadiy
__
Stefan Seefeld sympatico.ca> writes:
> I added support for the above quite a while ago (and I'm assured that
> this time it even made it into the release branch in time ).
> Thus, you can construct a list and keyword, then pass to a python
> callable as '*args' and '**kwds' respectively.
Right
Hi,
In native Python I can do something like this:
def goo(a,b,c):
return a+b+c
ll = [1,2,3]
goo( *ll )
And it will pass all the arguments properly. I need similar functionality in
C++:
Given
bp::object func;
bp::list args;
I'd like to invoke the function like this fun
What is the right way to report error from the Boost.Python extension module
init function?
Gennadiy
___
Cplusplus-sig mailing list
Cplusplus-sig@python.org
http://mail.python.org/mailman/listinfo/cplusplus-sig
Ralf W. Grosse-Kunstleve yahoo.com> writes:
>
>
> A comprehensive approach is to make the object picklable.
> As a side-effect, copy.deepcopy() will also work.
1. Are you saying that copy.deepcopy does not work without object being
picklable? What will happend if I try to use it for non pickla
Neal Becker gmail.com> writes:
>
> Gennadiy Rozental wrote:
>
> > This looks like trivial question from FAQ, but I can seem to fond the
> > answer.
> >
> > Any pointers?
> >
> > Genandiy
>
> Maybe overide __copy__?
How is it involved?
This looks like trivial question from FAQ, but I can seem to fond the answer.
Any pointers?
Genandiy
___
Cplusplus-sig mailing list
Cplusplus-sig@python.org
http://mail.python.org/mailman/listinfo/cplusplus-sig
Hi,
I've got exported class:
class_( "MyInterface" )
...
And I've got class in Python:
class ABC(object):
...
I am doing some processing of the class definition in Python and want to be able
to do the following (clazz here is ABC:
clazz.__bases__ = (MyInterface,) + clazz.__bases__
I am
Gregor Burger uibk.ac.at> writes:
> Maybe you can point me to the posts. I found you questions
> but not theanswer including the solution.
The only solution I know is right below.
>> The only viable solution I found is to *compile* the script first before
>> executing it. If I do this globa
Gregor Burger uibk.ac.at> writes:
> is it possible to use boost.python to define classes
> in a script (like in the one below), register the defined
> classes and later on create instances of the class?
Yes
> Is it possible to provide the same globals and locals to call_method
> so that Flow a
David Abrahams boostpro.com> writes:
> Frankly I'm not sure it's possible to use a function object in that way.
> Have you tried simply using the data member pointer without the wrapper?
>
> bp::class_< MyClass >( "MyClass", bp::no_init )
> .add_property( "field", &MyClass::field )
Hi,
I need to implement some translation in a getter and setter for particular
field.
I am getting compile time errors, I am not sure how to fix. I am using 1.33.1.
Here is what I do:
template
struct Getter {
explicit Getter( MyClass T::* mem ) : m_member( mem ) {}
bp::object operat
Hans Meine informatik.uni-hamburg.de> writes:
>
> On Monday 10 November 2008 08:56:14 Gennadiy Rozental wrote:
> > It can be resolved with additional export for class Derived:
> >
> > bp::class_,noncopyable>
> > ( "Derived", bp::no_init );
>
Patrick Atambo gmail.com> writes:
>
>
> I'd say you have 2 options depending
>
> Containment. This would require an API class that you export to Python with
methods that call your implementation and it's my favorite since from here you
can control what is used when calling your implementat
Simple scenario:
class IObject {};
class Base : public IObject {
public:
virtual void foo() {}
};
class Derived : public Base {
virtual void foo() {}
};
Both IObject and Base are exported into Python:
bp::class_( "IObject", bp::no_init );
bp::class_,noncopyable>( "Base", bp::no_init )
22 matches
Mail list logo