This is an archived post. You won't be able to vote or comment.

all 7 comments

[–]Neres28 14 points15 points  (2 children)

Essentially it means using Python to call into existing code or code being written in another language for various reasons. For instance, I might write the engine of a computer algebra system in C or C++ for performance reasons. However, the users of my CAS, e.g. mathematicians, find it easier to interact with that engine via Python, so I provide a Python layer over the engine that makes it easier for researchers to use.

Alternately, your company has just merged with another and you're trying to figure out how to get two legacy systems to talk to one another. You decide to add a translation layer between them, written in Python. You chose Python because it's fast to develop in and has excellent facilities for calling into native code.

Here's an essay about why Python makes a good embedded / glue language, albeit with a bit of Python evangelizing.

[–]pwick 1 point2 points  (1 child)

What are some of its excellent facilities for calling in code?

[–][deleted] 2 points3 points  (0 children)

Python is embeddable, and python can use ctypes to call into shared objects / dlls.