def process_input(command_string): if (command_string == ""): return blCommUtils.broadcast_output(time.ctime(time.time())+ "\n" + command_string+ "\n") if (command_string == "q"): sys.exit() print time.ctime(time.time()) + "\n" + command_string try: # daq_lib.set_field("program_state","Program Busy") execute_command(command_string) except NameError: error_string = "Unknown command: " + command_string print error_string except SyntaxError: print "Syntax error" except KeyError: print "Key error" except TypeError: print "Type error" except KeyboardInterrupt: # abort_data_collection() print "Interrupt caught by daq server\n"
def process_input(command_string): if (command_string == ""): return blCommUtils.broadcast_output( time.ctime(time.time()) + "\n" + command_string + "\n") if (command_string == "q"): sys.exit() print time.ctime(time.time()) + "\n" + command_string try: # daq_lib.set_field("program_state","Program Busy") execute_command(command_string) except NameError: error_string = "Unknown command: " + command_string print error_string except SyntaxError: print "Syntax error" except KeyError: print "Key error" except TypeError: print "Type error" except KeyboardInterrupt: # abort_data_collection() print "Interrupt caught by daq server\n"
def hi_macro(): print "hey from macros\n" blCommUtils.broadcast_output("broadcast hi")