GETTING STARTED

PyCForge includes Typed and Runtime conversion, the current editor tools, and optional PCFC11 compilation in one application.

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. Select Transpile → Typed, then click the Transpile button or press 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

add(2, 3) returns 5. This produces a C function, not a complete executable. Follow the complete C caller example to build and run it.

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, dictionaries, and objects, mixed containers, lambdas, and list/dictionary comprehensions across explicitly supplied source documents. Select Transpile → Runtime, then click Transpile, 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, Numba, Jedi, and autopep8; pip also installs their required supporting packages. Ting's review runtime is bundled with PyCForge. 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-{{APPLICATION_VERSION}}-py3-none-any.whl
.\.venv\Scripts\python.exe -m pycforge.ide

A source archive can be installed by substituting its .tar.gz filename. Put double quotes around a package path that contains spaces.

Install and launch with the same Python interpreter. The virtual-environment commands above do not require activation or a PowerShell execution-policy change. Check the installation with:

.\.venv\Scripts\python.exe -m pip check
.\.venv\Scripts\python.exe -c "import pycforge; print(pycforge.__version__)"

Jedi supplies editor completion and name analysis; autopep8 supplies requested formatting. Their supported release families are Jedi 0.19.x and autopep8 2.3.x. Installing PyCForge resolves these dependencies automatically; there is no separate Ting installation.

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, dictionaries, and tuples
Convert classes with fields and methodsMutable classes and methods
Use unions, function values, or closuresFunctions, annotations, and lambdas
Build lists or dictionaries with generators and filtersList and dictionary comprehensions
Find, replace, rename, format, or copy a definitionProfessional Python editing
Resolve a conversion errorFixing conversion errors
Compile and compare the generated CConversion checklist and C callers
Read text, process rows, and save a reportFile-processing workflows
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. Enter a few topic words, such as regex replacement or dictionary comprehension; all query words must occur on a matching page. Clear the search to remove highlights. With the search field focused, Enter moves through result pages; F3 moves to the next matching page and Shift+F3 to the previous one. Matching words are highlighted within each page. Help works offline.

Each Python example is a separate source document unless it explicitly names multiple files. Copy the code inside one example block, select its stated conversion mode, and keep the accompanying expected result outside the source. Examples of editor operations, terminal commands, C callers, and Python API requests are labelled separately.

PyCForge produces C source. Use the conversion checklist to build and compare it with Python using your own C toolchain.