List Info

Thread: Re: boost.python metaclass problem




Re: boost.python metaclass problem
country flaguser name
United States
2007-03-02 09:55:31
> I don't know pyqt, and I'm not sure you get access to boost.python's
> own metaclass. (David ?)

Simply use the __class__ attribute of a Boost.Python wrapped class.
I.e. if the class is "bar" (and you construct objects with "bar()"), bar.__class__
will give you the metaclass.
See also: boost/libs/python/doc/tutorial/doc/tutorial.qbk
Look for:  __metaclass__

But, like Hans I'm also a bit skeptical ...
Ralf



Sucker-punch spam with award-winning protection.
Try the free Yahoo! Mail Beta.
Re: boost.python metaclass problem
country flaguser name
United States
2007-03-02 10:02:56
Ralf W. Grosse-Kunstleve wrote:
>> I don't know pyqt, and I'm not sure you get access
to boost.python's
>> own metaclass. (David ?)
> 
> Simply use the __class__ attribute of a Boost.Python
wrapped class.
> I.e. if the class is "bar" (and you construct
objects with "bar()"),
> bar.__class__
> will give you the metaclass.
> See also:
boost/libs/python/doc/tutorial/doc/tutorial.qbk
> Look for:  __metaclass__

Yeah, I certainly know how to access an object's metaclass.
What I
don't know is how to access that metaclass directly to
derive from
it in order to generate a new metaclass suitable for the new
class...

Regards,
		Stefan

-- 

      ...ich hab' noch einen Koffer in Berlin...
_______________________________________________
C++-sig mailing list
C++-sigpython.org
http:
//mail.python.org/mailman/listinfo/c++-sig

[1-2]

about | contact  Other archives ( Real Estate discussion Medical topics )