An example project demonstrating how to include assembly code into a Python-compatible shared library which can be imported into the CPython runtime execution.
This project doesn't do much except it can run an x86/64 instruction that is normally unavailable to processes. This project is mostly to see if it could be done, it doesn't have much use other than a template, so far.
Copyright 2022 Luke Campbell
See LICENSE for details.
This project requires an installation of Python 3, and the build-essentials package (gcc, gnu-make)
make
The make process produces a cpuid.so
which can be imported by CPython:
import cpuid
cpuid.cpuid()
cpuid.cpuid()
returns a tuple of 3 values: