Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Python > Extending C++ with Python scripting: "twin objects" or "proxyobjects"?

Reply
Thread Tools

Extending C++ with Python scripting: "twin objects" or "proxyobjects"?

 
 
jdetaeye
Guest
Posts: n/a
 
      03-18-2008

Hi,

I would like to use Python as a scripting language for a C++ framework
I am working on.

The most common approach for this seems to be a "twin objects": the
python and the C++ object have the same lifespan and are always linked
to each other.
My initial thinking was to use a "proxy approach" instead: the python
object is only a temporary proxy object with a pointer to the real C++
object. The C++ object would live much longer than the proxy.

Is the proxy approach a valid alternative? I can't imagine it hasn't
been done before...
I am interested in hearing your experiences with it...

Currently I see the following + and -:
+ Easier for the C++ code (ie less changes, less coupling, no gc-
issues)
- Extending the framework through subclasses in Python is much harder
Anything else?

Regards,

Johan
 
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
return tuple from C to python (extending python) Kiran Python 5 10-26-2006 12:55 PM
return tuple from C to python (extending python) Kiran C Programming 3 10-26-2006 12:55 PM
extending python: which python code calls the c iterator methods? Johannes Zellner Python 1 01-18-2006 12:22 PM
extending and embedding python with C# Luke Python 3 10-24-2003 04:43 PM
Extending the python language John D Python 1 09-17-2003 12:26 AM



Advertisments