Repository navigation
termlogo v1.0.0
[2026-10-07] - Arrays, property lists, files, keys, text cursor, GOTO, round pens and textbook coordinates
- Fixed nested
FILLED: the inner shape was painted first and then cleared wherever the outer polygon overlapped it. Inner shapes are now painted again on top of the outer one, in order, and the stencil still records each once - Added arrays:
{a b c}literals (with@origin),ARRAY MDARRAY LISTTOARRAY ARRAYTOLIST ARRAYP SETITEM MDITEM MDSETITEM, and array support inITEM COUNT FIRST LAST PICK MEMBERP. The tokeniser now treats{and}as delimiters - Added property lists (
PPROP GPROP REMPROP PLIST PLISTS PPS ERPS;ERALLclears them),GOTOandTAG, and.MAYBEOUTPUT - Added file streams:
OPENREAD OPENWRITE OPENAPPEND OPENUPDATE CLOSE CLOSEALL ALLOPEN SETREAD SETWRITE READER WRITER READPOS SETREADPOS WRITEPOS SETWRITEPOS EOFP FILEP ERASEFILE.READWORD READLISTandPRINT TYPE SHOWfollowSETREADandSETWRITE. Open files are closed when Logo ends - Added
READCHAR,READCHARSandKEYP: immediate key input in the REPL (Escape and Ctrl-C stop the program), character reads from piped input and from files - Added
CURSOR,SETCURSORand a workingCLEARTEXTfor the REPL's text area (five rows, per command). Outside the REPLSETCURSORis accepted and does nothing - Braille and half-block pens are now round brushes of the true width instead of whole-pixel squares
PENREVERSEnow XORs colours, so drawing a line twice restores what was under it, and a wide reversed stroke flips each pixel once. It used to toggle a pixel between the pen colour and empty- Added
--fit NandFITWINDOW N: scale so an N x N Logo window (1000 for textbook programs) fits the canvas; the fit survives terminal resizing - Not changed: a Braille cell still shows one colour (its most common), because a Braille character has a single foreground colour
- Added the demo screenshots under
docs/images/and a Gallery section in the README - Validation (as at 2026-10-07): 302 tests passing, including a live pseudo-terminal test of
READCHARandSETCURSOR; Ruff lint/format and launcher syntax checks clean. Not tried by hand in Ghostty
Single-file download: termlogo.pyz
One executable file that runs wherever Python 3.10 or later is installed. There is nothing else to install.
# download termlogo.pyz from the Assets list below, then:
chmod +x termlogo.pyz
./termlogo.pyz # interactive REPL
./termlogo.pyz program.logo # run a Logo program
./termlogo.pyz -e 'repeat 36 [fd 30 rt 100]'
./termlogo.pyz program.logo -o out.png # export .svg, .png, .txt or .stl
# optional: put it on your PATH as `termlogo`
mkdir -p ~/bin && mv termlogo.pyz ~/bin/termlogo- If you have no
python3on your PATH, run it aspython3.11 termlogo.pyz(any version 3.10+). - On macOS, a downloaded file may be quarantined. If it will not run, use
xattr -d com.apple.quarantine termlogo.pyz. - It is a Python archive, not a compiled binary. Type
HELPin the REPL for every command, or see the README.