GETTING STARTED
PyCForge converts a supported set of Python functions into portable C11 source. This guide helps you write code that converts and check the result.
Installed version: {{APPLICATION_VERSION}}. The accepted source syntax follows Python 3.11.
Save this as example.py:
def add(left: int, right: int) -> int:
return left + right
Open it in the workspace and choose Transpile Source Bundle (Ctrl+Return), or run:
pycforge convert example.py --output example.c
If conversion succeeds, inspect and save the generated C. If it fails, select the diagnostic and correct the indicated Python. PyCForge does not compile or run the result; the conversion checklist covers those next steps.
In PowerShell, create a virtual environment and install the downloaded package. Replace the archive path if needed.
py -3.12 -m venv .venv .\.venv\Scripts\python.exe -m pip install --upgrade pip .\.venv\Scripts\python.exe -m pip install .\pycforge-1.1.1.tar.gz .\.venv\Scripts\python.exe -m pycforge.ide
A downloaded wheel can be installed by substituting its .whl filename for the archive. To check your installed version:
python -c "import pycforge; print(pycforge.__version__)"
| I want to convert… | Open this page |
|---|---|
| Local declarations, assignments, numbers, or strings | Variables, types, and strings |
| Variables outside functions or calls across files | Functions and module variables |
Branches, loops, or a loop's else | Branches and loops |
| Fixed lists, dictionaries, sets, or simple records | Containers and records |
| UTF-8 file reading or writing | Reading and writing files |
| A command-line or Python API workflow | Command line and Python API |
Select a topic on the left, or search across all pages. F3 moves to the next match and Shift+F3 to the previous one. Help works offline. For a quick overview, use Supported conversions; for a rejection, use Fixing conversion errors.