A portable Python 3.x interpreter written in C11 for embedding in C/C++ projects, designed as a Lua alternative for game scripting.
pocketpy is a portable Python 3.x interpreter written in modern C11, designed to be embedded into C/C++ projects. It solves the need for a lightweight, dependency-free scripting engine, particularly targeting game development as a more feature-rich alternative to Lua.
C/C++ developers, especially game engine creators and tool developers, who need to embed a Python interpreter for scripting without the overhead of CPython.
Developers choose pocketpy for its zero-dependency design, full Python 3.x compatibility, and ease of integration via a simple C-API, offering a performant and portable scripting solution where CPython is too heavy.
Portable Python 3.x Interpreter in Modern C for Game Scripting
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Only requires the C standard library, ensuring easy integration and portability across platforms, as highlighted in the features.
Supports modern Python 3.x syntax including functions, classes, generators, and match-case, making it a viable alternative to Lua.
Officially tested on Windows, Linux, macOS, Android, iOS, and embedded systems, demonstrating cross-platform capabilities.
Provides C-API and pybind11-compatible interfaces for writing Python bindings, similar to CPython's API.
As a lightweight interpreter, it likely lacks many modules from CPython's stdlib, which can restrict functionality for complex tasks.
Requires specific compiler flags like --std=c11 and /utf-8 for MSVC, adding complexity to the setup process compared to drop-in solutions.
Has fewer third-party libraries and community resources compared to CPython, which might slow down development for some use cases.
pocketpy is an open-source alternative to the following products: