Thun/implementations/Python
sforman 6674fdffb6 Better exceptions. 2023-08-28 20:46:19 -07:00
..
misc minor cleanup 2023-07-27 09:55:02 -07:00
Makefile Use Python as SHELL in Makefile. 2023-07-27 10:32:45 -07:00
README.md minor edits 2023-07-31 12:08:39 -07:00
joy.py Better exceptions. 2023-08-28 20:46:19 -07:00
vlist.py cleanup 2023-08-13 08:49:20 -07:00

README.md

Joy interpreter in Python

Simple pleasures are the best.

This interpreter written in Python is part of the Thun project.

Building

To build an executable script just run:

make

This will copy the implementations/defs.txt file into the Python project and splice it into the joy.py file to create the joy executable script.

Installation

I had the Python package set up to upload to PyPI as "Thun", but the whole Python distribution story seems unsettled at the moment (2023) so I've gone back to the old ways: there is a single script joy.py that gets modified (defs.txt is inserted) to create a joy script that uses the "shebang" trick to pretend to be a binary. In other words, run make and put the resulting joy script in your PATH, if that's what you want to do. In a year or two the Python folks will have sorted things out and we can go back to pip install Thun or whatever.

In the meantime, after make splices the defs.txt file into the joy.py script to make the joy script you can start it as normal:

./joy

There is a "quiet" mode for e.g. using joy from a shell script:

./joy -q

This suppresses the initial banner output and the prompt text.