A versatile compiler to make TI-BASIC programs from Python 3 (with some restrictions)
pip install ti-python
CLI
python -m ti_python --help
or
ti-python --help
python -m ti_python examples/helloworld.py
Python
from ti_python import compile
code = "print('Hello World!')"
print(compile(code))
See examples/
for example programs
print
andinput
- Integer and string variables (with multi-character names)
- Basic arithmetic
- Basic If statements
- Comparisons
- While loops
- String operations
- Pixel graphics functions (use
clear_screen()
andpixel_on/off(y,x,COLOR_NAME)
) - Lists
- Functions
- Advanced/Polished graphical output
- More advanced comparisons and operations (exponents, roots,
and
,or
)
Non-compiler related
- 8XP encoding
Your Python code still has to follow some restrictions due to the nature of the TI-BASIC.
- Using
print
with commas will not insert spaces in-between - The
input
function doesn't always return Strings, they can be numbers - Lists are 1-indexed
These are known restrictions, but this compiler is still in development so of course you will still have many other issues