GETTING STARTED
PyCForge is a desktop workspace for editing Python and converting supported code into C11. Start with a small function, then select the conversion mode that matches your program.
Installed version: {{APPLICATION_VERSION}}. Supported source syntax follows Python 3.11.
Save this as example.py:
def add(left: int, right: int) -> int:
return left + right
Ctrl+Return).The equivalent terminal command is:
pycforge convert example.py --output example.c
Typed conversion is the default. It uses annotated functions and direct C types, and supports multiple supplied modules, fixed containers, records, and the documented file operations.
Runtime value conversion handles constructed strings, shared mutable lists and objects, mixed containers, lambdas, and list comprehensions in one source document. Select Transpile Runtime Values from the Transpile menu, or add --runtime-values to the conversion command.
Read Supported conversions for a side-by-side comparison. Examples identify their mode; changing the mode changes both the supported forms and the generated C interface.
Use Python 3.11–3.13. Installation includes PySide6, NumPy, and Numba. On Windows:
py -m pip install pycforge py -m pycforge.ide
On macOS or Linux:
python -m pip install pycforge python -m pycforge.ide
Add --upgrade to the pip install command to update an existing installation. The pycforge-workspace command also opens the desktop app.
Create a virtual environment and install the downloaded wheel. Substitute the actual package path if necessary.
py -3.12 -m venv .venv .\.venv\Scripts\python.exe -m pip install .\pycforge-1.1.3-py3-none-any.whl .\.venv\Scripts\python.exe -m pycforge.ide
A source archive can be installed by substituting its .tar.gz filename.
| Task | Help topic |
|---|---|
| Edit files, inspect results, or save C | Desktop workspace |
| Convert typed functions and fixed data | Variables, types, and strings |
| Construct, split, join, or slice text at runtime | Runtime strings |
| Share mutable data or mix element types | Mutable lists and mixed tuples |
| Convert classes with fields and methods | Mutable classes and methods |
| Use unions, function values, or closures | Functions, annotations, and lambdas |
| Build lists with generators and filters | List comprehensions |
| Automate conversion | Command line and Python API |
The navigation tree follows the guide's reading order. Each page has topic links and previous/next navigation. Search covers all pages; F3 moves to the next match and Shift+F3 to the previous one. Help works offline.
PyCForge produces C source. Use the conversion checklist to build and compare it with Python using your own C toolchain.