'Constructor.
The optional locals argument will be passed to the
InteractiveInterpreter base class.
The optional filename argument should specify the (file)name
of the input stream; it will show up in tracebacks.'

def __init__(self, locals=None, filename='<console>'):

    InteractiveInterpreter.__init__(self, locals)
    self.filename = filename
    self.resetbuffer()
