'Start Python interpreter'

def start_interpreter(self, namespace):

    self.clear()
    if (self.interpreter is not None):
        self.interpreter.closing()
    self.interpreter = Interpreter(namespace, self.exitfunc, SysOutput, WidgetProxy, DEBUG)
    self.interpreter.stdout_write.data_avail.connect(self.stdout_avail)
    self.interpreter.stderr_write.data_avail.connect(self.stderr_avail)
    self.interpreter.widget_proxy.sig_set_readonly.connect(self.setReadOnly)
    self.interpreter.widget_proxy.sig_new_prompt.connect(self.new_prompt)
    self.interpreter.widget_proxy.sig_edit.connect(self.edit_script)
    self.interpreter.widget_proxy.sig_wait_input.connect(self.wait_input)
    if self.multithreaded:
        self.interpreter.start()
    banner = create_banner(self.message)
    self.write(banner, prompt=True)
    for cmd in self.commands:
        self.run_command(cmd, history=False, new_prompt=False)
    self.new_prompt(self.interpreter.p1)
    self.refresh.emit()
    return self.interpreter
