ForeignThon¶
Write Python in any human language.
ForeignThon is a transpiler that converts .xx.py files into standard Python — keywords, builtins, and exceptions all translated into your language. The compiled output runs anywhere without ForeignThon installed.
How it works¶
ForeignThon uses Python's tokenize module to swap NAME tokens. Strings, comments, and f-strings are never touched. The result is identical, valid Python.
Install¶
At a glance¶
| Feature | Description |
|---|---|
| Transpiler | Tokenizer-based, safe, unicode-aware |
| File format | .xx.py where xx is the language code |
| Errors | Shown in your language first, English below |
| Postfix syntax | @@ operator for SOV languages |
| Custom packs | Local JSON override, no PyPI needed |
| CLI | fpy run, fpy compile, fpy decompile, fpy new |