1 #import os, readline as pyreadline
3 #histfile = os.path.expanduser("~/.mal-history")
7 # with open(histfile, "r") as hf:
8 # for line in hf.readlines():
9 # pyreadline.add_history(line.rstrip("\r\n"))
12 # #print("Could not open %s" % histfile)
15 #def readline(prompt="user> "):
17 # line = raw_input(prompt)
18 # pyreadline.add_history(line)
19 # with open(histfile, "a") as hf:
20 # hf.write(line + "\n")
33 if not buf
: raise EOFError()
35 if res
[-1] == '\n': return res
[:-1]