USING PYCForge
Reliable conversion starts with the supported Python forms and input sizes. The most useful limits are listed here.
PyCForge reads the submitted Python without running it. It does not import installed packages or open filenames mentioned by that Python. It produces C source; compiling and running that source are separate steps you perform with your own tools.
| Item | Limit | When it matters |
|---|---|---|
| Integer values and results | Signed 64-bit range | Python integers can grow beyond this range; generated C integers cannot. |
| Source text | Default 1,000,000 bytes and 100,000 lines | Reduce large input files when conversion reports a source limit. |
| Included source files | Up to 64 | Every file must include a supported function. |
| Fixed container elements | 1โ64 | Keep each list, tuple, dictionary, or supported set within this size. |
| Record fields | 1โ64 | Use the simple record form in the reference. |
| Nested source constructs | Up to 128 levels | Simplify deeply nested expressions, branches, or loops. |
| File-read size | Default 1 MiB; maximum configurable 16 MiB | An oversized file returns status 4 when the generated C runs. |
| Constant string expansion | Bounded by the conversion's source-size and work limits | A short expression such as a huge string repetition may still be too large. |
Runtime strings passed from C must be valid UTF-8 without embedded NUL characters. Keep pointers valid for all uses, with byte lengths below INT64_MAX. Search over large strings may be slow, especially for repeated partial matches.
PyCForge reports a diagnostic and produces no new C result. Read the message, reduce the relevant input, and convert again. A previous successful output still describes the previous source. Cancelling a conversion also leaves you without a new result.
Conversion success does not test all possible inputs. Keep arithmetic results within range, check file status values, and compare your C function's results with Python on representative inputs. Conversion checklist gives a practical sequence.