raise SystemExit(msg)
io_db["teststring"] = str(os.getpid()) + " " + str(time.time())
io_db["save_wait"] = 0
+ io_db["verbose"] = False
io_db["record_chunk"] = ""
os.makedirs(io_db["path_server"], exist_ok=True)
io_db["file_out"] = open(io_db["path_out"], "w")
is preceded by a server_test() call.
"""
server_test()
- print("input " + prefix + ": " + command)
+ if io_db["verbose"]:
+ print("input " + prefix + ": " + command)
try:
tokens = shlex.split(command, comments=True)
except ValueError as err:
parser = argparse.ArgumentParser()
parser.add_argument('-s', nargs='?', type=int, dest='replay', const=1,
action='store')
+ parser.add_argument('-v', dest='verbose', action='store_true')
opts, unknown = parser.parse_known_args()
return opts
try:
libpr = prep_library()
rand = RandomnessIO()
- opts = parse_command_line_arguments()
setup_server_io()
+ opts = parse_command_line_arguments()
+ if opts.verbose:
+ io_db["verbose"] = True
if None != opts.replay:
replay_game()
else: