Hi all,
I am going to generate a python wrapper of a C library, and I am
wondering which one is a better tool for me, SIP or SWIG ?
SWIG supports many scripting languages such as python, ruby, and perl,
while SIP is specific to python, so I think maybe SIP is more suitable
to generate better wrappers(sorry for my ignorance if I am wrong at this
point) with python.
But it seems that SIP is mainly used for pyQT and hasn't gained general
acceptance with python community.
Could someone give me a better comparison of SIP and SWIG ?
My concerns:
1. I just want an python wrapper for C/C++ code. The support of other
scripting languages is not important.
2. Easy to learn and easy to use.
Any comments will be greatly appreciated.
Regards,
xiaojf 1 4412 fd********@gmail.com schrieb:
Hi all,
I am going to generate a python wrapper of a C library, and I am
wondering which one is a better tool for me, SIP or SWIG ?
SWIG supports many scripting languages such as python, ruby, and perl,
while SIP is specific to python, so I think maybe SIP is more suitable
to generate better wrappers(sorry for my ignorance if I am wrong at this
point) with python.
But it seems that SIP is mainly used for pyQT and hasn't gained general
acceptance with python community.
Could someone give me a better comparison of SIP and SWIG ?
My concerns:
1. I just want an python wrapper for C/C++ code. The support of other
scripting languages is not important.
2. Easy to learn and easy to use.
The reasons SIP hasn't gained more attraction are dark to me. At least
when it comes to C++, it's support is waaay better than SWIG. There also
exists some Boost Python stuff, but I never wrapped my head around that.
However, if you are "only" wrapping C, pyrex is my tool of choice. It
has build-in distutils support, and it is very easy to write. So if you
can, go with pyrex. If you must wrap C++, go with SIP - boost
non-withstanding.
Diez This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: Matt Whelan |
last post by:
Supposedly, recent versions of SWIG can be made to work with MS VC++'s
non-standard integer data types. According to a recent SWIG ChangeLog
entry:
%apply long long { __int64 };
should make...
|
by: Ernie |
last post by:
Hi,
I am learning swig to use C codes from Python.
Here is the swig file mvf.i:
%module mvf
%include "carrays.i"
%array_class(double, doubleArray);
%typemap(out) double, float "$result =...
|
by: Java and Swing |
last post by:
I am trying to wrap some C code I have. Currently I have something
like...
defs.h
-----------
typedef unsigned long MY_DIGIT;
myapp.c
-------------
void MakeDigits(MY_DIGIT digits) {
|
by: Bart Ogryczak |
last post by:
Hi,
I´m looking for some benchmarks comparing SWIG generated modules with
modules made directly with C/Python API. Just how much overhead does
SWIG give? Doing profile of my code I see, that it...
|
by: myheartinamerica |
last post by:
Hello,
I spent the morning figuring out how to use SWIG on Microsoft Windows.
I compiled the example from the SWIG tutorial on http://www.swig.org.
The biggest stumbling block was not knowing...
|
by: jiangfan |
last post by:
Dear All,
I am new to SWIG, and I tried to search the SWIG
mailinglist for my specific question, but I did not find it. And for a
simple one c++ file, I can handle it successfully.
Now I have...
|
by: Stodge |
last post by:
Yet another SWIG question (YASQ!).
I'm having a problem with using an abstract base class. When
generating the Python bindings, SWIG thinks that all the concrete
classes that derive from this...
|
by: Uberman |
last post by:
I have a bit of a odd arrangement here with SWIG, Python, Embedded Python and
C++ classes exported into Python. Here's the plot:
I have a class defined in a C++ DLL library. I am wrapping this...
|
by: Basha J P M |
last post by:
I am beginner in python.
I am working through the tutorial examples from http://www.swig.org/ and
have run into some problems. I took the following command instructions from
the tutorial on...
|
by: Charles Arthur |
last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
|
by: emmanuelkatto |
last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud.
Please let me know.
Thanks!
Emmanuel
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
by: Sonnysonu |
last post by:
This is the data of csv file
1 2 3
1 2 3
1 2 3
1 2 3
2 3
2 3
3
the lengths should be different i have to store the data by column-wise with in the specific length.
suppose the i have to...
|
by: Hystou |
last post by:
There are some requirements for setting up RAID:
1. The motherboard and BIOS support RAID configuration.
2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers,...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
| | |