Getting Started
Lupe scripts are UTF-8 text files ending in
.lupe
. The
lupe
command runs them. The same interpreter is also the
lupaxa-lupe
command and
python -m lupaxa.lupe
.
Install
The PyPI name is
lupaxa-lupe
. The import path is
lupaxa.lupe
.
Requires Python 3.11 or newer. The standard library is enough to run scripts.
From a checkout of this repository:
The language pages live in
mkdocs/
. Build them locally with the pinned MkDocs packages in
requirements.txt
:
First Script
Save this as
hello.lupe
:
Run it:
When
lupe
is on
PATH
, the shell can run the file itself:
Check the syntax without running it:
Show the tokens, then the syntax tree:
Interactive Session
The session keeps names between lines. A line that is only an expression prints its value. A block can continue onto the next prompt.
exit(0)
ends the session, and so does the end of input.
The version in the banner is the package version.
Script Arguments
lupe run
takes arguments after
--
. A direct run, including a shebang, takes every argument after the file name. Both are available from
args()
:
That prints
["first", "second"]
.