Skip to main content

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/*

Metadata

Release files for interpreted 0.2.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for interpreted 0.2.0
File Size Uploaded
interpreted-0.2.0.tar.gz 16.8 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for interpreted 0.2.0
File Interpreter ABI Platform
interpreted-0.2.0-py3-none-any.whl Python 3 none any Details

Total release size: 34.9 kB

Release files / interpreted-0.2.0.tar.gz

Download URL interpreted-0.2.0.tar.gz
Size 16.8 kB
Tags Source
SHA-256 checksum
How to use checksums
5b91aa739477c146b0cc8ffb0d445729be5577471d3ad3ae89f33bf25791bd3f
BLAKE2b-256 checksum
How to use checksums
8e827d465d3111d309f5b8112645d8021fe3ee1c153be37002ca3dd54a047bf2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.1 CPython/3.12.3

Release files / interpreted-0.2.0-py3-none-any.whl

Download URL interpreted-0.2.0-py3-none-any.whl
Size 18.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
876be33af55dd047ca9723583ec5ccb990f1a837faae51861a7a93fffe6db445
BLAKE2b-256 checksum
How to use checksums
28805177f5161770370ab1eb883ba679cc2f062e98cfe9becb6b9c7376235c92
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.1 CPython/3.12.3

Release history Release notifications | RSS feed

This release

0.2.0 This release

2 release files

0.1.0

2 release files

0.0.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page