'on_enter'

def on_enter(self, command):

    if self.profile:
        t0 = time()
        for _ in range(10):
            self.execute_command(command)
        self.insert_text((u'\n<\u0394t>=%dms\n' % (100.0 * (time() - t0))))
        self.new_prompt(self.interpreter.p1)
    else:
        self.execute_command(command)
    self.__flush_eventqueue()
