MCPcopy
hub / github.com/fluentpython/example-code-2e / load

Function load

18-with-match/lispy/original/lispy.py:103–105  ·  view source on GitHub ↗

Eval every expression from a file.

(filename)

Source from the content-addressed store, hash-verified

101 else: return str(x)
102
103def load(filename):
104 "Eval every expression from a file."
105 repl(None, InPort(open(filename)), None)
106
107def repl(prompt='lispy> ', inport=InPort(sys.stdin), out=sys.stdout):
108 "A prompt-read-eval-print loop."

Callers 1

add_globalsFunction · 0.70

Calls 2

InPortClass · 0.85
replFunction · 0.70

Tested by

no test coverage detected