def getSource(self):
        """
        Return a string containing the currently entered source.

        This is only the code which will be considered for execution
        next.
        """
        return (b'\n'.join(self.interpreter.buffer) +
                b'\n' +
                b''.join(self.lineBuffer))

        Return a string containing the currently entered source.

        This is only the code which will be considered for execution
        next.
        
stackoverflow/venv/lib/python3.6/site-packages/twisted/conch/manhole.py