GETTING STARTED

Start here

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.

Your first conversion

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.

Install a downloaded package on Windows

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__)"

Find the right example

I want to convert…Open this page
Local declarations, assignments, numbers, or stringsVariables, types, and strings
Variables outside functions or calls across filesFunctions and module variables
Branches, loops, or a loop's elseBranches and loops
Fixed lists, dictionaries, sets, or simple recordsContainers and records
UTF-8 file reading or writingReading and writing files
A command-line or Python API workflowCommand line and Python API

Using Help

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.