Пример #1
0
    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()
Пример #2
0
    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()
Пример #3
0
    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")
Пример #4
0
    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")
Пример #5
0
    def ExecuteCommands(self, commands):
        Shell.ExecuteCommands(self, commands)

        if not self.hold:
            self.GetInterpreter().draw()