python/c++/swig: some more problems.
bpeng at rice.edu
Mon Jun 14 02:53:03 CEST 2004
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?
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.
More information about the Python-list