June 2017
Beginner to intermediate
274 pages
6h 49m
English
In this chapter, we'll discuss how to integrate compiled code into Python programs. We'll take a look at the benefits and drawbacks of our compiled code and see two ways of making a connection between Python's managed environment and code that runs directly on the hardware.
We'll see how to use the ctypes package and tie it to the interface of a C dynamic library, calling its functions and receiving their output from within our Python code. We'll also look at an easy way to write compiled code modules so that they could be imported and called directly from Python.
We'll cover the following topics in detail:
Read now
Unlock full access