Commit 116b4798 authored by Stefan Marr's avatar Stefan Marr

Fix implementation of std_print

And make prints robust to msg being None
Signed-off-by: default avatarStefan Marr <git@stefan-marr.de>
parent 12ce8230
......@@ -589,16 +589,16 @@ class Universe(object):
return result
def error_print(msg):
os.write(2, msg)
os.write(2, msg or "")
def error_println(msg = ""):
os.write(2, msg + "\n")
def std_print(msg):
print msg,
os.write(1, msg or "")
def std_println(msg=""):
print msg
def std_println(msg = ""):
os.write(1, msg + "\n")
def main(args):
u = Universe()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment