This sample code is replicated here from https://dbader.org/blog/python-ctypes-tutorial.
- You can use either
CMakeor theMakefilefor trying out the demo. - Simplest way is to run
makeon the terminal and it will build and run the example.
- Refer this GitHub repository for more details.
- The code will not match the example on the website as it has been modified to some extent to remove warning and other minor issues.
- In-case you have
Python2andPython3observe the runtime behavior.