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

B

Bo Peng

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
though:

1. Is there a way to access int * member of an object from a pointer
returned by Python? '_88401708_p_int'
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
this?

Many thanks in advance.
Bo
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,744
Messages
2,569,480
Members
44,900
Latest member
Nell636132

Latest Threads

Top