Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Python > c/c++ implementation of python base and derived class

Reply
Thread Tools

c/c++ implementation of python base and derived class

 
 
Robert Harrison
Guest
Posts: n/a
 
      07-16-2003
Can anyone point me to an example of how,
in C or C++, to

1) implement a new-style Python class, and
2) derive another new class from it?

I think that I've managed to do 1) correctly,
but 2) eludes both me and google.

Thanks in advance

Robert
 
Reply With Quote
 
 
 
 
Mike Rovner
Guest
Posts: n/a
 
      07-16-2003
Robert Harrison wrote:

> in C or C++, to
>
> 1) implement a new-style Python class, and
> 2) derive another new class from it?


Take a look to boost.python at
http://www.boost.org/libs/python/doc...ial/index.html

Mike




 
Reply With Quote
 
 
 
 
Robert Harrison
Guest
Posts: n/a
 
      07-17-2003
Boost is indeed pretty powerful and cool, but I
was trying to understand the actual implementation.

A bit more searching shows that all is revealed in
the relevant PEP

http://www.python.org/peps/pep-0253.html
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Casting from base to derived class in base constructor pastbin@gmail.com C++ 2 02-07-2008 02:41 PM
Derived::Derived(const Base&) and Derived& operator=(const Base&) developereo@hotmail.com C++ 1 05-23-2007 01:44 PM
Derived::Derived(const Base&) developereo@hotmail.com C++ 4 05-23-2007 09:32 AM
Derived::Derived(const Base&) and Derived& operator=(const Base&) developereo@hotmail.com C++ 1 05-23-2007 12:07 AM
Python class derived from a C++ base class Devrim Erdem Python 1 01-17-2004 08:29 PM



Advertisments