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)

Installation

pip install ti-python

Usage

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

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.2.tar.gz (17.0 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.2-py3-none-any.whl (18.1 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: ti_python-0.1.2.tar.gz
  • Upload date:
  • Size: 17.0 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.2.tar.gz
Algorithm Hash digest
SHA256 27c68d9ebd1d7761551553295c3f70d0976ef8f1777e2ce0b8197ff917ef537b
MD5 74eed7dc9ad8abcf9a97c552626d12cd
BLAKE2b-256 0b008a3db4236162975e0551ecf1cd24e571782a086cc74bb5d70067f0934ad5

See more details on using hashes here.

File details

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

File metadata

  • Download URL: ti_python-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 18.1 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.2-py3-none-any.whl
Algorithm Hash digest
SHA256 acbbe93286285a506f9f310881cb902d83cb194edfcb58b6beece2cd19026454
MD5 75f31539a5cafef0e9d8e9c988cc703f
BLAKE2b-256 3d76988923e216bdc04e4d0d1de094d809de4db334a4ba2c36f5186b18a86ec1

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