Skip to main content

A Python interpreter, in Python.

Project description

interpreted

A Python interpreter, written from scratch in Python.

This interpreter is made solely as the base for my talk, "Writing a Python interpreter from scratch, in half an hour.", but is now being used as a project to learn how interpreters work.

Feel free to open up issues, pick up tasks, and ask questions.

Installation

pip install interpreted

Usage

$ cat foo.py
print("2 + 2 is", 2 + 2)

def greet(name='User'):
    print('Hello,', name + '!')

greet()

$ interpreted foo.py
2 + 2 is 4
Hello, User!

Local Development / Testing

  • Create and activate a virtual environment
  • Run pip install -r requirements-dev.txt to do an editable install
  • Run pytest to run tests

Type Checking

Run mypy .

Create and upload a package to PyPI

Make sure to bump the version in setup.cfg.

Then run the following commands:

rm -rf build dist
python setup.py sdist bdist_wheel

Then upload it to PyPI using twine:

twine upload dist/*

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

interpreted-0.2.0.tar.gz (16.8 kB view details)

Uploaded Source

Built Distribution

interpreted-0.2.0-py3-none-any.whl (18.1 kB view details)

Uploaded Python 3

File details

Details for the file interpreted-0.2.0.tar.gz.

File metadata

  • Download URL: interpreted-0.2.0.tar.gz
  • Upload date:
  • Size: 16.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.12.3

File hashes

Hashes for interpreted-0.2.0.tar.gz
Algorithm Hash digest
SHA256 5b91aa739477c146b0cc8ffb0d445729be5577471d3ad3ae89f33bf25791bd3f
MD5 7df41d6402f708604620c7f5293fe76a
BLAKE2b-256 8e827d465d3111d309f5b8112645d8021fe3ee1c153be37002ca3dd54a047bf2

See more details on using hashes here.

File details

Details for the file interpreted-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: interpreted-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 18.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.12.3

File hashes

Hashes for interpreted-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 876be33af55dd047ca9723583ec5ccb990f1a837faae51861a7a93fffe6db445
MD5 b712224d889f81c7aada4744d030ee3c
BLAKE2b-256 28805177f5161770370ab1eb883ba679cc2f062e98cfe9becb6b9c7376235c92

See more details on using hashes here.

Supported by

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