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
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.
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 containers, classes with inheritance, mixed values, closures, and list/dictionary/set 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.
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. For startup reports and starting with default preferences, see Opening the workspace.
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. PyCForge does not pin dependency versions; the libraries retain their own compatibility requirements. Installing PyCForge resolves dependencies automatically; there is no separate Ting installation.
| Task | Help topic |
|---|---|
| Edit files, inspect results, or save C | Desktop workspace |
| Save a project bundle or restore a checkpoint | Projects and checkpoints |
| 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 | Lists, dictionaries, sets, and tuples |
| Convert classes, single or multiple inheritance, and method overrides | Mutable classes and methods |
| Use unions, closures, or function decorators | Functions, annotations, and closures |
| Build lists, dictionaries, or sets with generators and filters | List, dictionary, and set comprehensions |
| Find, replace, rename, format, or copy a definition | Professional Python editing |
| Resolve a conversion error | Fixing conversion errors |
| Compile and compare the generated C | Conversion checklist and C callers |
| Read text, process rows, and save a report | File-processing workflows |
| 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. 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.
Selected PyCForge caveats boxes beside examples explain conversion details that affect Python coding choices or C caller behavior. They supplement the operation tables and limits.
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.