<> [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 (!) * [[http://cython.org/|Cython]] -- Cython -- an improved version of Pyrex * [[http://cxx.sourceforge.net/|CXX]] - PyCXX - helper lib for writing Python extensions in C++ * [[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://www.picklingtools.com/|PicklingTools]] is a collection of libraries for exchanging Python Dictionaries between C++ and Python. * [[weave]] - include C code lines in Python program (deprecated in favor of Cython) * [[https://code.google.com/p/ackward/|ackward]] exposes parts of Python's standard library as idiomatic C++ * [[http://cffi.readthedocs.org/|CFFI]] - interact with almost any C code from Python, based on C-like declarations that you can often copy-paste from header files or documentation. === 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 * [[https://github.com/orangeduck/PyAutoC|PyAutoC]] - Automatically wrap C functions and structs, using just C compiler. * [[http://pwig.sourceforge.net/|pwig]] is a SWIG extension for writing new language modules in Python. * [[https://github.com/gjcarneiro/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 * [[https://pyside.github.io/docs/shiboken/|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 * [[http://www.swig.org/|SWIG]] - generate extension module from your .h files * [[https://github.com/wjakob/pybind11|pybind11]] - Similar to Boost.Python, but with a lean header-only implementation for C++11-capable compilers. * [[https://github.com/google/clif|pyclif]] - Google tool. Similar to SWIG, but user-friendly and targeted only C++11 well-written libs. * [[cppyy]] - Fast, automatic, Python-C++ bindings, including run-time template instantiations, cross-inheritance, auto-casting, etc. * [[https://www.scapix.com/|Scapix Language Bridge]] - generates Python (and other languages) bindings directly from C++ headers. ---- '''Articles''' * Using Python as glue [[https://docs.scipy.org/doc/numpy/user/c-info.python-as-glue.html|SciPy Documentation]] * Building Hybrid Systems with Boost.Python in [[http://www.boost.org/doc/libs/develop/libs/python/doc/html/article.html|C/C++ User Journal]] (2003) * Integrating Python, C and C++, presented at the ACCU conference by Duncan Booth (2003) * Embedding Python in Multi-Threaded C/C++ Applications in [[http://www.linuxjournal.com/article.php?sid=3641|LinuxJournal]] (2000) ---- '''Related''' * AppsWithPythonScripting = Delphi = * Python4Delphi - Python for Delphi is a set of free components that wrap up the Python Dll into Delphi. (https://github.com/pyscripter/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 * [[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 = Prolog = * PyLog (actually two ''different'' products) * [[http://agave.ahsc.arizona.edu/~schcats/projects/|prolog]] a simple interface to [[http://www.swi-prolog.org/|SWI-Prolog]] * bedevere - Python wrapper to GNU Prolog http://bedevere.sourceforge.net/ * [[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. See also http://www.google.com/search?hl=en&lr=&ie=ISO-8859-1&q=Python+prolog = Java = * [[Jython]] - Python implemented in Java * [[JPype]] - Allows Python to run java commands * [[Jepp]] - Java embedded Python * [[http://pypi.python.org/pypi/JCC/2.12|JCC]] - a C++ code generator for calling Java from C++/Python * [[http://pypi.python.org/pypi/javabridge|Javabridge]] - a package for running and interacting with the JVM from CPython * [[https://www.py4j.org/index.html|py4j]] - Allows Python to run java commands. * [[http://pybee.org/voc/|voc]] - Part of BeeWare suite. Converts python code to Java bytecode. * [[https://github.com/chrishumphreys/p2j|p2j]] - Converts Python code to Java. No longer developed. = C#/.NET = * [[https://www.activestate.com/company/press/press-releases/activestate-supports-microsoft-net-framework/|ActiveState]] supports Python .NET. * [[https://pythonnet.github.io|Python for .NET]] is a near-seamless integration of the CPython runtime with the .NET Common Language Runtime (CLR). * [[https://ironpython.net|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 * PyPerl http://search.cpan.org/dist/pyperl/ * [[http://search.cpan.org/search?query=Inline::Python&mode=all|Inline::Python]] * 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 [[http://web.archive.org/web/20110807032037/http://hurring.com/scott/code/python/serialize/|Web Archive Wayback Machine]] for the latest working version) = R = * RPy [[http://rpy.sourceforge.net/|http://rpy.sourceforge.net]] * RSPython http://www.omegahat.net/RSPython = Objective-C = * http://pyobjc.sourceforge.net/ = Tcl = * [[elmer]] - compile and run python code from Tcl, as if it was written in Tcl * [[https://github.com/amykyta3/tclpython|TclPython]] - A package for Tcl that allows you to pass strings of Python code from a Tcl environment to a Python (Python 2.x or 3.x) interpreter. * [[http://wiki.tcl.tk/1324|Tcl and other languages]] - Tcl's equivalent of this page. = Lua = * [[http://labix.org/lunatic-python|LunaticPython]] - a two-way bridge between Python and Lua. * [[http://pypi.python.org/pypi/lupa|Lupa]] - fast wrapper for LuaJIT2 written in Cython. * [[http://www.equi4.com/lux/|Lux]] - a mutant Lua emphasizing interoperation with Python, Perl, etc. = OCaml = * [[http://pycaml.sourceforge.net/|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 * [[PostgreSQL]] http://www.linuxgazette.com/issue80/nielsen.html * RenderMan http://www.lysator.liu.se/~ture/terry.html * CorbaPython: for a generic solution to language integration to name a few. There are much [[http://www.google.com/search?q=Python+binding&hl=en|more...]] = Other (standards and protocols) = * XMLRPC and SOAP * Yaml: [[http://www.yaml.org/|http://www.yaml.org]] = See also = Thinki: [[http://web.archive.org/web/20071108024137/http://www.thinkware.se/cgi-bin/thinki.cgi/UsingPythonWithOtherLanguages|UsingPythonWithOtherLanguages]]