def run_archy(): process_command_line_arguments() import debug debug_log = debug.DebugLog('log/debug.log') debug_log.install() import time print "---- Archy session started %s ----" % time.ctime() print debug.get_system_info() init_fundamentals() try: main() except SystemExit: # Archy exited gracefully. shutdownServiceThreads() except: print "---- Abnormal Archy termination ----" # Archy exited abnormally. shutdownServiceThreads() # TODO: We might want to implement a more "graceful" abnormal exit, such as informing the user that a fatal error occurred. import debug tb_info = debug.get_traceback() print tb_info debug.report_bug("Abnormal Archy termination", tb_info) import platform_specific platform_specific.shutdown_hook() print "---- Archy session ended %s ----" % time.ctime() debug_log.uninstall()
def run_archy(): process_command_line_arguments() import debug debug_log = debug.DebugLog('debug.log') debug_log.install() import time print "---- Archy session started %s ----" % time.ctime() print debug.get_system_info() init_fundamentals() try: main() except SystemExit: # Archy exited gracefully. shutdownServiceThreads() except: print "---- Abnormal Archy termination ----" # Archy exited abnormally. shutdownServiceThreads() # TODO: We might want to implement a more "graceful" abnormal exit, such as informing the user that a fatal error occurred. import debug tb_info = debug.get_traceback() print tb_info debug.report_bug("Abnormal Archy termination", tb_info) import platform_specific platform_specific.shutdown_hook() print "---- Archy session ended %s ----" % time.ctime() debug_log.uninstall()
def execute(self): import debug text = debug.get_system_info() self.addTextCmd = archyState.commandMap.findSystemCommand("AddText") self.addTextCmd.setinfo(text) self.addTextCmd.execute()