def stop(self): """Stop the game engine and close the sessions.""" end()
from game import GameEngine import init from log import end from ui.window import ClientWindow app = wx.App(False) # Parse command line options parser = argparse.ArgumentParser() parser.add_argument("--config-dir", help="An alternative configuration directory", default=".") args = parser.parse_args() # Load the user configuration engine = GameEngine(args.config_dir) engine.load() # Select the configured language lang = engine.settings.get_language() select(lang) # Create the client and ClientWindow window = ClientWindow(engine) world = window.world if world is not None: reactor.callLater(0, window.panel.CreateClient) reactor.registerWxApp(app) reactor.run(installSignalHandlers=0) end()
def _tap(rej,res): try: log.end(msg,addr) res(x) except Exception as e: rej(e)
Version: N/a Description: Testing Log Module ''' # ------------------------------ Imports ------------------------------ import log # ----------------------------- Functions ----------------------------- # N/a # ---------------------------- Main Module ---------------------------- log.start() # Log program start to log.txt if (__name__ == "__main__"): log.write("Main Module Started") # Write to log.txt try: x = str(input("What is your name?: ")) except: print("Error Occured") log.error("Input Error") # Log input error to log.txt print(f"Hi {}".format(x)) log.write(f"User name is {}".format(x)) # Write to log.txt log.end() # Log succesful program end