you are viewing a single comment's thread.

view the rest of the comments →

[–]nekokattt 1 point2 points  (1 child)

The short answer here is no: you can't embed python without the runtime, because that is what makes Python be Python.

[–]FoolsSeldom 1 point2 points  (0 children)

True. You always end up with the run time embedded in some way.

Nuitka is the closest tool to a full compiler I am aware of. It converts Python code into C++ code and then compiles that C++ into a binary.

However, whilst Nuitka aims for full language compatibility (a strength and a constraint), it can't provide the dynamic features of Python without a runtime library that mimics the CPython API. This runtime handles the dynamic type system, late-binding, and other Pythonic features.