Skip to main content

A versatile compiler to make TI-BASIC programs with Python 3 syntax

Project description

TI-Python

A versatile compiler to make TI-BASIC programs from Python 3 (with some restrictions)

Usage

CLI

python -m 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

Features

  • print and input
  • Integer and string variables (with multi-character names)
  • Basic arithmetic
  • Basic If statements
  • Comparisons
  • While loops
  • String operations

Goals/To Do

  • Lists
  • Functions
  • Graphical output
  • More advanced comparisons and operations (exponents, roots, and, or)

Non-compiler related

  • 8XP encoding

Restrictions

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

These are known restrictions, but this compiler is still in development so of course you will still have many other issues

Resources and References Used

TI-BASIC usage

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

ti_python-0.1.0.tar.gz (16.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

ti_python-0.1.0-py3-none-any.whl (18.0 kB view details)

Uploaded Python 3

File details

Details for the file ti_python-0.1.0.tar.gz.

File metadata

  • Download URL: ti_python-0.1.0.tar.gz
  • Upload date:
  • Size: 16.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.4

File hashes

Hashes for ti_python-0.1.0.tar.gz
Algorithm Hash digest
SHA256 a14862721708362983b3294a02e8e4c2072b57ab2bfcee9bd0eb4ede2e85f6ca
MD5 9b1e122044ecfb79b40c454d4aa66dbc
BLAKE2b-256 dead37414f750ce60ce8437cb3a0e310350fd2a44fb5b90190ccd6efff2e671a

See more details on using hashes here.

File details

Details for the file ti_python-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: ti_python-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 18.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.4

File hashes

Hashes for ti_python-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 5d441b1e09cd606f3dd7cec240c4f4d0c7d22db3abc2a63768f5b566fa8b3acc
MD5 50be3598e3bbb2976346f4ed4a651e96
BLAKE2b-256 d7528c2fb12739f12d809280874468f968d3dcb661dbaa1409a825079352803f

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page