def invoke(self, message): command = message.split(" ")[0] command = self.commands.get(command) if not command: raise NotFound() ctx = Context(message=message, command=command) ctx.command.invoke(ctx)
def __init__(self, parent): self.title = "title" self.path = "/home/nathan/Documents/workspace/rox projects" self.render = None context = Context(parent) project = MoreTex (None, context) context.root = project project.append (Init, context) firstText = Text (project, context) firstText.breakType = "nothing" project.quickAppend (firstText) project.append (Math, context) hep = MoreTex (project, context) hep.append (Text, context) project.texFiles.append (hep) self.root = project self.ratio = (9, 12)