def __init__(self, args): """ Create a terminal based on the term argument """ if args.term == "null": self.loaded = False return BasePlugin.__init__(self) self.time = None sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), "..", "terminals"))) try: terminal = importlib.import_module(args.term + "_terminal") except ImportError as e: print("Terminal %s not available: %s" % (args.term, e)) raise SystemExit self.debug = args.debug m = re.match(r"(\d+)x(\d+)", args.geometry) if m is None: print("Invalid geometry `%s`" % args.geometry) args.width, args.height = 80, 24 else: args.width = int(m.group(1)) args.height = int(m.group(2)) self.term = terminal.Terminal(args) self.name += "-%s" % args.term self.term.show()
def __init__(self, args): """ Create a terminal based on the term argument """ if args.term == "null": self.loaded = False return BasePlugin.__init__(self) self.time = None sys.path.append( os.path.abspath( os.path.join(os.path.dirname(__file__), "..", "terminals"))) try: terminal = importlib.import_module(args.term + "_terminal") except ImportError as e: print("Terminal %s not available: %s" % (args.term, e)) raise SystemExit self.debug = args.debug m = re.match(r"(\d+)x(\d+)", args.geometry) if m is None: print("Invalid geometry `%s`" % args.geometry) args.width, args.height = 80, 24 else: args.width = int(m.group(1)) args.height = int(m.group(2)) self.term = terminal.Terminal(args) self.name += "-%s" % args.term self.term.show()
def __init__(self, args): """ Enable debugger if args.debug is True """ BasePlugin.__init__(self) self.loaded = args.debug self.debugger_breaks = set() self.debugger_in_continue = False
def __init__(self, args): """ Create a terminal based on the term argument """ if args.term == "null": self.loaded = False return BasePlugin.__init__(self) self.time = None sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), "..", "terminals"))) try: terminal = importlib.import_module(args.term + "_terminal") except ImportError: print("Terminal %s not found" % args.term) raise SystemExit self.debug = args.debug self.term = terminal.Terminal(args) self.name += "-%s" % args.term self.term.show()