def key_Return(self, entry, event):
        text = self.getText()
        # Figure out if that Return meant "next line" or "execute."
        try:
            c = code.compile_command(text)
        except SyntaxError, e:
            # This could conceivably piss you off if the client's python
            # doesn't accept keywords that are known to the manhole's
            # python.
            point = buffer.get_iter_at_line_offset(e.lineno, e.offset)
            buffer.place(point)
            # TODO: Componentize!
            self.toplevel.output.append(str(e), "exception")
        except (OverflowError, __HOLE__), e:
            self.toplevel.output.append(str(e), "exception")
        else:
            if c is not None:
                self.sendMessage()
                # Don't insert Return as a newline in the buffer.
                self.history.append(text)
                self.clear()
                # entry.emit_stop_by_name("key_press_event")
                return True
            else:
                # not a complete code block
                return False

        return False
dataset/ETHPy150Open kuri65536/python-for-android/python-modules/twisted/twisted/manhole/ui/gtk2manhole.py/ConsoleInput.key_Return