GETTING STARTED

Start here

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.

Your first conversion

Save this as example.py:

def add(left: int, right: int) -> int:
    return left + right
  1. Open the file in PyCForge.
  2. Choose Transpile Source Bundle (Ctrl+Return).
  3. Review the result and any diagnostics.
  4. Choose Set C Destination, then Save Generated C.

The equivalent terminal command is:

pycforge convert example.py --output example.c

Choose a conversion mode

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.

Install and launch

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.

Install a downloaded package on Windows

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.

Find the right topic

TaskHelp topic
Edit files, inspect results, or save CDesktop workspace
Convert typed functions and fixed dataVariables, types, and strings
Construct, split, join, or slice text at runtimeRuntime strings
Share mutable data or mix element typesMutable lists and mixed tuples
Convert classes with fields and methodsMutable classes and methods
Use unions, function values, or closuresFunctions, annotations, and lambdas
Build lists with generators and filtersList comprehensions
Automate conversionCommand line and Python API

Using Help

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.