6787
Comment: updated URL to point to current Tcl Wiki instead of old inactive site.
|
7300
web archive wayback machine for broken link to PHP-serialize
|
Deletions are marked like this. | Additions are marked like this. |
Line 9: | Line 9: |
* [[http://cython.org/|Cython]] -- Cython -- an improved version of Pyrex | |
Line 16: | Line 17: |
Line 18: | Line 20: |
* [[boost.python]] - expose C++ classes functions and objects to Python, and vice-versa, using just C++ compiler | * [[boost.python]] - Expose C++ classes functions and objects to Python, and vice-versa, using just C++ compiler * [[https://github.com/orangeduck/PyAutoC|PyAutoC]] - Automatically wrap C functions and structs, using just C compiler. |
Line 20: | Line 24: |
* [[http://code.google.com/p/pybindgen/|PyBindGen]] Python bindings code generator for pure C or C++ APIs. The generator is written in Python and has low complexity. The generated code is lean, efficient, and highly readable | * [[http://code.google.com/p/pybindgen/|PyBindGen]] Python bindings code generator for pure C or C++ APIs. The generator is written in Python and has low complexity. The generated code is lean, efficient, and highly readable |
Line 23: | Line 27: |
* [[http://www.swig.org/|SWIG]] - generate extension module from your .h files | * [[http://www.swig.org/|SWIG]] - generate extension module from your .h files |
Line 26: | Line 31: |
Line 29: | Line 35: |
Line 31: | Line 38: |
Line 52: | Line 60: |
See also [[http://www.google.com/search?hl=en&lr=&ie=ISO-8859-1&q=Python+prolog]] | See also http://www.google.com/search?hl=en&lr=&ie=ISO-8859-1&q=Python+prolog |
Line 59: | Line 67: |
* [[http://pypi.python.org/pypi/javabridge|Javabridge]] - a package for running and interacting with the JVM from CPython | |
Line 67: | Line 76: |
* PyPerl [[http://search.cpan.org/dist/pyperl/]] * [[http://search.cpan.org/search?query=Inline%3A%3APython&mode=all|Inline::Python]] |
* PyPerl http://search.cpan.org/dist/pyperl/ * [[http://search.cpan.org/search?query=Inline::Python&mode=all|Inline::Python]] |
Line 71: | Line 81: |
For converting/porting Perl code to Python the tool 'Bridgekeeper' [[http://www.crazy-compilers.com/bridgekeeper/]] may be handy. |
For converting/porting Perl code to Python the tool 'Bridgekeeper' http://www.crazy-compilers.com/bridgekeeper/ may be handy. |
Line 76: | Line 84: |
* PiP (Python in PHP) http://www.csh.rit.edu/~jon/projects/pip/ * PHP "Serialize" in Python http://hurring.com/scott/code/python/serialize/ (broken link; see the [[http://web.archive.org/web/20110807032037/http://hurring.com/scott/code/python/serialize/|Web Archive Wayback Machine]] for the latest working version) |
|
Line 77: | Line 87: |
* PiP (Python in PHP) [[http://www.csh.rit.edu/~jon/projects/pip/]] * PHP "Serialize" in Python [[http://hurring.com/scott/code/python/serialize/]] |
|
Line 81: | Line 88: |
* RPy [[http://rpy.sourceforge.net]] * RSPython [[http://www.omegahat.org/RSPython]] |
* RPy [[http://rpy.sourceforge.net/|http://rpy.sourceforge.net]] * RSPython http://www.omegahat.org/RSPython |
Line 95: | Line 102: |
* [[http://www.equi4.com/lux/|Lux]] - a mutant Lua emphasizing interoperation with Python, Perl, etc. | * [[http://www.equi4.com/lux/|Lux]] - a mutant Lua emphasizing interoperation with Python, Perl, etc. |
Line 101: | Line 108: |
* Eiffel/Haskell [[http://epolyglot.sourceforge.net/]] (last updated 2001) | * Eiffel/Haskell http://epolyglot.sourceforge.net/ (last updated 2001) |
Line 105: | Line 112: |
* LotusNotes [[http://www.dominopower.com/issuesprint/issue200008/command.html]] * [[PostgreSQL]] [[http://www.linuxgazette.com/issue80/nielsen.html]] * RenderMan [[http://www.lysator.liu.se/~ture/terry.html]] |
* LotusNotes http://www.dominopower.com/issuesprint/issue200008/command.html * [[PostgreSQL]] http://www.linuxgazette.com/issue80/nielsen.html * RenderMan http://www.lysator.liu.se/~ture/terry.html |
Line 109: | Line 116: |
Line 113: | Line 121: |
* Yaml: http://www.yaml.org | * Yaml: [[http://www.yaml.org/|http://www.yaml.org]] |
Contents
[Hint: The idea is to create pages for the stuff, not just link it.]
C/C++
There a various tools which make it easier to bridge the gap between Python and C/C++:
Pyrex - write your extension module on Python
Cython -- Cython -- an improved version of Pyrex
CXX - PyCXX - helper lib for writing Python extensions in C++
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.
elmer - compile and run python code from C, as if it was written in C
PicklingTools is a collection of libraries for exchanging Python Dictionaries between C++ and Python.
weave - include C code lines in Python program
ackward exposes parts of Python's standard library as idiomatic C++
C/C++ Binding Generators
Tools to make C/C++ functions/methods accessible from Python by generating binding (Python extension or module) from header files.
boost.python - Expose C++ classes functions and objects to Python, and vice-versa, using just C++ compiler
PyAutoC - Automatically wrap C functions and structs, using just C compiler.
pwig is a SWIG extension for writting new language modules in Python.
PyBindGen Python bindings code generator for pure C or C++ APIs. The generator is written in Python and has low complexity. The generated code is lean, efficient, and highly readable
shiboken - Binding Generator used to create PySide Python bindings for Qt
SIP - similar to SWIG but specialised for Python and C++. Used to create PyQt, the Qt API wrapper library
SWIG - generate extension module from your .h files
Articles
Embedding Python in Multi-Threaded C/C++ Applications in LinuxJournal
Building Hybrid Systems with Boost.Python in C/C++ User Journal
Integrating Python, C and C++, presented at the ACCU conference by Duncan Booth, and his conference slides
Related
Delphi
Python4Delphi - Python for Delphi is a set of free components that wrap up the Python Dll into Delphi. (http://code.google.com/p/python4delphi/)
Fortran
F2PY - Fortran to Python Interface Generator (http://cens.ioc.ee/projects/f2py2e/)
PyFort - The Python-Fortran connection tool (http://pyfortran.sourceforge.net/)
Lisp
CLPython - Python implemented in Common Lisp
Lython (archived page) - Lisp front-end for Python
Pymacs - integration of Python with Emacs Lisp
Prolog
PyLog (actually two different products)
prolog a simple interface to SWI-Prolog
bedevere - Python wrapper to GNU Prolog http://bedevere.sourceforge.net/
pwig includes examples of wrapping Python for SWI-Prolog.
pyswip is a ctypes based module that enables querying SWI-Prolog.
See also http://www.google.com/search?hl=en&lr=&ie=ISO-8859-1&q=Python+prolog
Java
Jython - Python implemented in Java
JPype - Java for CPython
Jepp - Java embedded Python
JCC - a C++ code generator for calling Java from C++/Python
Javabridge - a package for running and interacting with the JVM from CPython
C#/.NET
Python for .NET is a near-seamless integration of the CPython runtime with the .NET Common Language Runtime (CLR).
IronPython is an implementation of Python for .net, which allows you to import .net class libraries seamlessly in Python.
Perl
See http://www.faqts.com/knowledge_base/view.phtml/aid/17202/fid/1102
PyPerlish - Perl idioms in Python
For converting/porting Perl code to Python the tool 'Bridgekeeper' http://www.crazy-compilers.com/bridgekeeper/ may be handy.
PHP
PiP (Python in PHP) http://www.csh.rit.edu/~jon/projects/pip/
PHP "Serialize" in Python http://hurring.com/scott/code/python/serialize/ (broken link; see the Web Archive Wayback Machine for the latest working version)
R
Objective-C
Tcl
elmer - compile and run python code from Tcl, as if it was written in Tcl
TclPython - a Python package for Tcl allows execution of Python (version 2.2 or above) code from a Tcl interpreter.
Tcl and other languages - Tcl's equivalent of this page.
Lua
LunaticPython - a two-way bridge between Python and Lua.
Lupa - fast wrapper for LuaJIT2 written in Cython.
Lux - a mutant Lua emphasizing interoperation with Python, Perl, etc.
OCaml
Pycaml - write Python extension modules in OCaml (instead of C), and use Python code and native libraries from OCaml programs.
Eiffel and Haskell
Eiffel/Haskell http://epolyglot.sourceforge.net/ (last updated 2001)
PythonVsHaskell has a section "Using both Python & Haskell with ctypes".
Other (applications)
LotusNotes http://www.dominopower.com/issuesprint/issue200008/command.html
CorbaPython: for a generic solution to language integration
to name a few. There are much more...
Other (standards and protocols)
- XMLRPC and SOAP
Yaml: http://www.yaml.org
See also
Thinki: UsingPythonWithOtherLanguages