#NEWLINE# def getlines( path ) : #NEWLINE# #INDENT# 'return a list of lines for a given path.\n\n    This override is also careful to map "<stdin>" to the full contents of\n    the readline buffer.\n    ' #NEWLINE# if ( path == '<stdin>' ) : #NEWLINE# #INDENT# return StdinCache . singleton ( ) . refreshFromReadline ( ) . getlines ( ) #NEWLINE# #UNINDENT# if ( path in linesCache_ ) : #NEWLINE# #INDENT# return linesCache_ [ path ] #NEWLINE# #UNINDENT# if ( path not in pathExistsOnDiskCache_ ) : #NEWLINE# #INDENT# pathExistsOnDiskCache_ [ path ] = os . path . exists ( path ) #NEWLINE# #UNINDENT# if pathExistsOnDiskCache_ [ path ] : #NEWLINE# #INDENT# with open ( path , 'r' ) as f : #NEWLINE# #INDENT# linesCache_ [ path ] = f . readlines ( ) #NEWLINE# #UNINDENT# return linesCache_ [ path ] #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# return None