Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Python > python/c++/swig: some more problems.

Thread Tools

python/c++/swig: some more problems.

Bo Peng
Posts: n/a
Dear list,

With the help from this list, I have experimented some techniques and I
have to say python/c++/swig is wonderful! I still have some questions

1. Is there a way to access int * member of an object from a pointer
returned by Python?
>>> a.internalIndex

I have used vector<int> etc (in C++ code) and vector.i (swig) to pass
python list to C++ like 'foo([1,2,3])' but I do not want to use vectors
everywhere due to performance considerations.

2. The shadow class has definitions like __init__(self, *args) so I can
not use keyward arguments like a(x=1,y=2). Is there an option in SWIG to
enable this? If I have to, how can I modify the interface file to enable

Many thanks in advance.
Reply With Quote

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
Kamaelia 0.4.0 RELEASED - Faster! More Tools! More Examples! More Docs! ;-) Michael Python 4 06-26-2006 08:00 AM
With a Ruby Yell: more, more more! Robert Klemme Ruby 5 09-29-2005 06:37 AM
Need some help for some perl homework.... Perl 0 02-25-2004 01:45 AM
Forms Authentication question: How to have some pages open and some requiring forms authentication Eric ASP .Net 2 02-13-2004 02:14 PM
Some questions regarding 070-305 and hopefully some right answers. Needs correction... wink, wink ;-) Daniel Walzenbach MCSD 1 11-10-2003 12:25 AM