+ 1
How to cooperate one programming language to an other(eg. python with java or c++)?
4 Respostas
+ 4
Sometimes large applications are built up of smaller programs or modules written in different programming languages.
+ 4
Higher level languages are sometimes implemented via lower level ones. E.g. CPython is a Python implementation in C.
+ 3
So sometimes it is easier/faster to temporarily "step" into another programming language in order to solve a particular problem. With regards to Python & Java there is Jython which is generated entirely in Java byte codes, so using them in your app is quite simple because it is now as portable as Java. It has an extremely clean interface with Java because Java can now call Python classes and Python can call Java classes. Now for C++ & Python there is Boost.Python. "The Boost Python Library is a framework for interfacing Python and C++. It allows you to quickly and seamlessly expose C++ classes functions and objects to Python, and vice-versa, using no special tools -- just your C++ compiler. It is designed to wrap C++ interfaces non-intrusively, so that you should not have to change the C++ code at all in order to wrap it, making Boost.Python ideal for exposing 3rd-party libraries to Python. The library's use of advanced metaprogramming techniques simplifies its syntax for users, so that wrapping code takes on the look of a kind of declarative interface definition language (IDL)."
https://www.jython.org/
http://www.boost.org/doc/libs/1_49_0/libs/python/doc/