Skip to main content
Python Software Foundation 20th Year Anniversary Fundraiser  Donate today!

Python implementation of Lox programming language

Project description

pylox is Python implementation of Lox programming language which is a demo language from [Crafting Interpreters]( book by [Bob Nystrom](

I’m doing this because:

  1. I want to learn about language design and implementation
  2. I don’t want to just read the book or copy and paste the code from it and I want to do something else than C or Java
  3. Python is my main language these days and I want to use something I’m most comfortable with
  4. Maybe after Python version I decide to reimplement it (or make my own toy language) in Go. Or force myself to learn Rust which seems like a good idea.
  5. Fun.

This is work in progress.


Python 3.6 for no particular reasons except f-strings are used in few places. Other than that, it could easily be ported to even Python 2.7 (but I don’t plan to).

Run it

python3 -m pylox [script]



Project details

Download files

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

Files for pylox, version 0.0.1
Filename, size File type Python version Upload date Hashes
Filename, size pylox-0.0.1-py3.6.egg (9.9 kB) File type Egg Python version 3.6 Upload date Hashes View
Filename, size pylox-0.0.1-py3-none-any.whl (6.4 kB) File type Wheel Python version py3 Upload date Hashes View
Filename, size pylox-0.0.1.tar.gz (4.7 kB) File type Source Python version None Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring DigiCert DigiCert EV certificate Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page