Index: Lib/code.py =================================================================== --- Lib/code.py (revision 77361) +++ Lib/code.py (working copy) @@ -246,7 +246,7 @@ self.resetbuffer() more = 0 - def push(self, line): + def push(self, line, symbol='single'): """Push a line to the interpreter. The line should not have a trailing newline; it may have @@ -262,7 +262,7 @@ """ self.buffer.append(line) source = "\n".join(self.buffer) - more = self.runsource(source, self.filename) + more = self.runsource(source, self.filename, symbol) if not more: self.resetbuffer() return more