def push(self, command): try: Shell.push(self, command) except: if command[:command.rfind("(")] not in ("quit", "close", "exit"): raise return self.GetInterpreter().GetDocument().AddUndo(command) if not self.hold: self.GetInterpreter().draw()
def __init__(self, parent, interpreter): self.interpreter = interpreter self.Hold(False) text = "Welcome to DEAP!\nThe pylab module is loaded and ready for use..\n" Shell.__init__(self, parent, id=-1, introText=text, locals=interpreter.DefineFunctions()) self.push("from pylab import *; import matplotlib")
def __init__(self, parent, interpreter): self.interpreter = interpreter self.Hold(False) text = "Welcome to DEAP!\nThe pylab module is loaded and ready for use..\n" Shell.__init__(self, parent, id = -1, introText = text, locals = interpreter.DefineFunctions()) self.push("from pylab import *; import matplotlib")
def ExecuteCommands(self, commands): Shell.ExecuteCommands(self, commands) if not self.hold: self.GetInterpreter().draw()