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
Release history Release notifications | RSS feed
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 hashes)
Built Distribution
Close
Hashes for interpreted-0.2.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 876be33af55dd047ca9723583ec5ccb990f1a837faae51861a7a93fffe6db445 |
|
MD5 | b712224d889f81c7aada4744d030ee3c |
|
BLAKE2b-256 | 28805177f5161770370ab1eb883ba679cc2f062e98cfe9becb6b9c7376235c92 |