#NEWLINE# def __init__( self , path , mode = 'r' ) : #NEWLINE# #INDENT# assert ( mode in ( 'r' , 'w' ) ) #NEWLINE# self . _mode = mode #NEWLINE# if ( ( self . _mode == 'r' ) and ( not os . path . isfile ( path ) ) ) : #NEWLINE# #INDENT# raise ValueError ( ( "`%s' is not a file." % path ) ) #NEWLINE# #UNINDENT# self . _path = path #NEWLINE# self . _fh = open ( self . _path , ( mode + 'b' ) )