Files
foreignthon-core/README.md
KeshavAnandCode e50b2754ae
All checks were successful
CI / test (push) Successful in 12s
added readme
2026-05-20 17:29:55 -05:00

1.1 KiB

ForeignThon

Write Python in any human language.

ForeignThon transpiles .es.py, .ta.py and more into standard Python — keywords, builtins, exceptions, all translated. Errors come back in your language too.

# main.es.py
def saludar(nombre):
    retornar f"Hola, {nombre}!"

para i en dist(3):
    escribir(saludar(f"mundo {i}"))
fpy run main.es.py
# Hola, mundo 0!
# Hola, mundo 1!
# Hola, mundo 2!

Install

pip install foreignthon      # Core 
pip install foreignthon-es   # Spanish
pip install foreignthon-ta   # Tamil

Quick start

fpy new myproject --lang es
cd myproject
fpy run src/main.es.py

Commands

Command Description
fpy new <name> --lang <code> Scaffold a new project
fpy run <file> Transpile and run
fpy compile <file> Transpile to .compiled.py
fpy decompile <file> --lang <code> Convert Python back to a language
fpy check <file> Validate without running

Documentation

fpy.keshavanand.net

License

GPL v3