Python und C/C++, aber wie?
Verfasst: Donnerstag 26. Juli 2007, 01:43
Es gibt verschiedene Tools die es leichter machen, die Kluft zwischen Python und C/C++ zu überbrücken:
Daß das dennoch keine simple Angelegenheit ist, ergibt sich schon aus der vielzahl der Tools und damit auch Lösungsansätzen.
Worum es mir geht, ist zunächst einmal ein allgemeines Verständnis für die Arbeitsweise dieser Tools zu entwickeln. Etwas über deren Vor- und Nachteile in deutscher Sprache zu erfahren, bevor ich mir die Mühe mache, mich detailiert in ein oder gar mehere Tools einzuarbeiten.
Wenn also jemand ein oder mehere dieser Tools soweit kennt, daß er ihre "Funktionsweise" beschreiben kann, dann bitte ich darum.
Ideal wäre eine Antwort auf die Frage, worin sich diese Tools unterscheiden.
1. SWIG - generate extension module from your .h files
2. boost.python - write (tiny) C++ class to wrap your classes in an extension module
3. Pyrex - write your extension module on Python (!)
4. CXX
5. SCXX
6. weave - include C code lines in Python program
7. SIP - similar to SWIG but specialised for Python and C++. Used to create PyQt, the Qt API wrapper library
8. ctypes is a Python module allowing to create and manipulate C data types in Python. These can then be passed to C-functions loaded from dynamic link libraries.
9. elmer - compile and run python code from C, as if it was written in C
http://wiki.python.org/moin/Integrating ... 95fd295e19
Danke, pythom
Edit (Leonidas): Sinnlose Umfrage gelöscht.
Daß das dennoch keine simple Angelegenheit ist, ergibt sich schon aus der vielzahl der Tools und damit auch Lösungsansätzen.
Worum es mir geht, ist zunächst einmal ein allgemeines Verständnis für die Arbeitsweise dieser Tools zu entwickeln. Etwas über deren Vor- und Nachteile in deutscher Sprache zu erfahren, bevor ich mir die Mühe mache, mich detailiert in ein oder gar mehere Tools einzuarbeiten.
Wenn also jemand ein oder mehere dieser Tools soweit kennt, daß er ihre "Funktionsweise" beschreiben kann, dann bitte ich darum.
Ideal wäre eine Antwort auf die Frage, worin sich diese Tools unterscheiden.
1. SWIG - generate extension module from your .h files
2. boost.python - write (tiny) C++ class to wrap your classes in an extension module
3. Pyrex - write your extension module on Python (!)
4. CXX
5. SCXX
6. weave - include C code lines in Python program
7. SIP - similar to SWIG but specialised for Python and C++. Used to create PyQt, the Qt API wrapper library
8. ctypes is a Python module allowing to create and manipulate C data types in Python. These can then be passed to C-functions loaded from dynamic link libraries.
9. elmer - compile and run python code from C, as if it was written in C
http://wiki.python.org/moin/Integrating ... 95fd295e19
Danke, pythom
Edit (Leonidas): Sinnlose Umfrage gelöscht.