hissp.repl module

The Lissp Read-Evaluate-Print Loop. For interactive use.

hissp.repl.ps1 = '#> '

String specifying the primary prompt of the LisspREPL.

hissp.repl.ps2 = '#..'

String specifying the secondary (continuation) prompt of the LisspREPL.

class hissp.repl.LisspREPL(locals=None, filename='<console>')

Bases: code.InteractiveConsole

Lissp’s Read-Evaluate-Print Loop, layered on Python’s.

You can initialize the REPL with a locals dict, which is useful for debugging other modules. Call interact() to start.

interact(banner=None, exitmsg=None)

Imports readline if available, then super().interact().


Convenience function to start a LisspREPL.

Uses the calling frame’s globals and locals as locals if not provided.

Unlike hissp.repl.main, no _macros_ are added to the locals to avoid clobbering an existing namespace.


REPL command-line entry point.

If __main__ is not provided, it creates a new one to take the place of the current __main__ module.

hissp.macros._macro_ is imported into the module namespace, making the bundled macros immediately available unqualified.