5066
Comment:
|
5136
|
Deletions are marked like this. | Additions are marked like this. |
Line 1: | Line 1: |
[[TableOfContents]] | <<TableOfContents>> |
Line 8: | Line 8: |
* [http://www.swig.org/ SWIG] - generate extension module from your .h files * ["boost.python"] - write (tiny) C++ class to wrap your classes in an extension module * ["Pyrex"] - write your extension module on Python (!) * [http://cxx.sourceforge.net/ CXX] * [http://starship.python.net/crew/gmcm/scxx.html SCXX] * ["weave"] - include C code lines in Python program * ["SIP"] - similar to SWIG but specialised for Python and C++. Used to create PyQt, the ["Qt"] API wrapper library * [http://starship.python.net/crew/theller/ctypes/ 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 * [http://pwig.sourceforge.net/ pwig] is a SWIG extension for writting new language modules in Python. |
* [[http://www.swig.org/|SWIG]] - generate extension module from your .h files * [[boost.python]] - write (tiny) C++ class to wrap your classes in an extension module * [[Pyrex]] - write your extension module on Python (!) * [[http://cxx.sourceforge.net/|CXX]] * [[http://starship.python.net/crew/gmcm/scxx.html|SCXX]] * [[weave]] - include C code lines in Python program * [[SIP]] - similar to SWIG but specialised for Python and C++. Used to create PyQt, the [[Qt]] API wrapper library * [[http://starship.python.net/crew/theller/ctypes/|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 * [[http://pwig.sourceforge.net/|pwig]] is a SWIG extension for writting new language modules in Python. |
Line 20: | Line 20: |
* Embedding Python in Multi-Threaded C/C++ Applications in [http://www.linuxjournal.com/article.php?sid=3641 LinuxJournal] * Building Hybrid Systems with Boost.Python in [http://www.cuj.com/documents/s=8188/cuj0307abrahams/ C/C++ User Journal] * [http://dales.rmplc.co.uk/Duncan/accu/integratingpython.html Integrating Python, C and C++], presented at the ACCU conference by Duncan Booth, and his [http://dales.rmplc.co.uk/Duncan/accu conference slides] |
* Embedding Python in Multi-Threaded C/C++ Applications in [[http://www.linuxjournal.com/article.php?sid=3641|LinuxJournal]] * Building Hybrid Systems with Boost.Python in [[http://www.cuj.com/documents/s=8188/cuj0307abrahams/|C/C++ User Journal]] * [[http://dales.rmplc.co.uk/Duncan/accu/integratingpython.html|Integrating Python, C and C++]], presented at the ACCU conference by Duncan Booth, and his [[http://dales.rmplc.co.uk/Duncan/accu|conference slides]] |
Line 28: | Line 28: |
* ["F2PY"] - Fortran to Python Interface Generator (http://cens.ioc.ee/projects/f2py2e/) | * [[F2PY]] - Fortran to Python Interface Generator (http://cens.ioc.ee/projects/f2py2e/) |
Line 32: | Line 32: |
* ["CLPython"] - Python implemented in Common Lisp * [http://web.archive.org/web/20050207230521/http://www.caddr.com/code/lython/ Lython (archived page)] - Lisp front-end for Python * [http://pymacs.progiciels-bpi.ca/ Pymacs] - integration of Python with Emacs Lisp |
* [[CLPython]] - Python implemented in Common Lisp * [[http://web.archive.org/web/20050207230521/http://www.caddr.com/code/lython/|Lython (archived page)]] - Lisp front-end for Python * [[http://pymacs.progiciels-bpi.ca/|Pymacs]] - integration of Python with Emacs Lisp |
Line 38: | Line 38: |
* [http://agave.ahsc.arizona.edu/~schcats/projects/ prolog] a simple interface to [http://www.swi-prolog.org/ SWI-Prolog] | * [[http://agave.ahsc.arizona.edu/~schcats/projects/|prolog]] a simple interface to [[http://www.swi-prolog.org/|SWI-Prolog]] |
Line 40: | Line 40: |
* [http://pwig.sourceforge.net/ pwig] includes examples of wrapping Python for SWI-Prolog. * [http://code.google.com/p/pyswip/ pyswip] is a ctypes based module that enables querying SWI-Prolog. |
* [[http://pwig.sourceforge.net/|pwig]] includes examples of wrapping Python for SWI-Prolog. * [[http://code.google.com/p/pyswip/|pyswip]] is a ctypes based module that enables querying SWI-Prolog. |
Line 43: | Line 43: |
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 46: | Line 46: |
* ["Jython"] - Python implemented in Java * [http://jpype.sourceforge.net JPype] - Java for CPython |
* [[Jython]] - Python implemented in Java * [[JPype]] - Java for CPython * [[Jepp]] - Java embedded Python |
Line 50: | Line 51: |
* [http://www.activestate.com/Corporate/Initiatives/NET/Research.html?_x=1 ActiveState research] * [http://zope.org/Members/Brian/PythonNet/ Python for .NET] is a near-seamless integration of the CPython runtime with the .NET Common Language Runtime (CLR). |
* [[http://www.activestate.com/Corporate/Initiatives/NET/Research.html?_x=1|ActiveState research]] * [[http://zope.org/Members/Brian/PythonNet/|Python for .NET]] is a near-seamless integration of the CPython runtime with the .NET Common Language Runtime (CLR). |
Line 55: | Line 56: |
* PyPerl [http://aspn.activestate.com/ASPN/CodeDoc/pyperl/perlmodule.html] * [http://search.cpan.org/search?query=Inline%3A%3APython&mode=all Inline::Python] |
* PyPerl [[http://aspn.activestate.com/ASPN/CodeDoc/pyperl/perlmodule.html]] * [[http://search.cpan.org/search?query=Inline%3A%3APython&mode=all|Inline::Python]] |
Line 60: | Line 61: |
'Bridgekeeper' [http://www.crazy-compilers.com/bridgekeeper/] | 'Bridgekeeper' [[http://www.crazy-compilers.com/bridgekeeper/]] |
Line 64: | Line 65: |
* RPy [http://rpy.sourceforge.net] * RSPython [http://www.omegahat.org/RSPython] |
* RPy [[http://rpy.sourceforge.net]] * RSPython [[http://www.omegahat.org/RSPython]] |
Line 71: | Line 72: |
* ["elmer"] - compile and run python code from Tcl, as if it was written in Tcl * [http://jfontain.free.fr/tclpython.htm TclPython] - a Python package for Tcl allows execution of Python (version 2.2 or above) code from a Tcl interpreter. * [http://mini.net/tcl/1324 Tcl and other languages] - Tcl's equivalent of this page. |
* [[elmer]] - compile and run python code from Tcl, as if it was written in Tcl * [[http://jfontain.free.fr/tclpython.htm|TclPython]] - a Python package for Tcl allows execution of Python (version 2.2 or above) code from a Tcl interpreter. * [[http://mini.net/tcl/1324|Tcl and other languages]] - Tcl's equivalent of this page. |
Line 76: | Line 77: |
* [http://moin.conectiva.com.br/LunaticPython LunaticPython] - a two-way bridge between Python and Lua. * [http://www.equi4.com/lux/ Lux] - a mutant Lua emphasizing interoperation with Python, Perl, etc. |
* [[http://moin.conectiva.com.br/LunaticPython|LunaticPython]] - a two-way bridge between Python and Lua. * [[http://www.equi4.com/lux/|Lux]] - a mutant Lua emphasizing interoperation with Python, Perl, etc. |
Line 80: | Line 81: |
* [http://pycaml.sourceforge.net/ Pycaml] - write Python extension modules in OCaml (instead of C), and use Python code and native libraries from OCaml programs. | * [[http://pycaml.sourceforge.net/|Pycaml]] - write Python extension modules in OCaml (instead of C), and use Python code and native libraries from OCaml programs. |
Line 83: | Line 84: |
* Eiffel/Haskell [http://epolyglot.sourceforge.net/] (last updated 2001) | * Eiffel/Haskell [[http://epolyglot.sourceforge.net/]] (last updated 2001) |
Line 87: | Line 88: |
* 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 91: | Line 92: |
to name a few. There are much [http://www.google.com/search?q=Python+binding&hl=en more...] | to name a few. There are much [[http://www.google.com/search?q=Python+binding&hl=en|more...]] |
Line 98: | Line 99: |
Thinki: wiki:Thinki/UsingPythonWithOtherLanguages | Thinki: Thinki:UsingPythonWithOtherLanguages |
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++:
SWIG - generate extension module from your .h files
boost.python - write (tiny) C++ class to wrap your classes in an extension module
Pyrex - write your extension module on Python
weave - include C code lines in Python program
SIP - similar to SWIG but specialised for Python and C++. Used to create PyQt, the Qt API wrapper library
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
pwig is a SWIG extension for writting new language modules in Python.
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
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
C#/.NET
Python for .NET is a near-seamless integration of the CPython runtime with the .NET Common Language Runtime (CLR).
Perl
See http://www.faqts.com/knowledge_base/view.phtml/aid/17202/fid/1102
PyPerl http://aspn.activestate.com/ASPN/CodeDoc/pyperl/perlmodule.html
PyPerlish - Perl idioms in Python
For converting/porting Perl code to Python the tool 'Bridgekeeper' http://www.crazy-compilers.com/bridgekeeper/ may be handy.
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.
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