#NEWLINE# def envFileAsDictionary( fname ) : #NEWLINE# #INDENT# retval = { #NEWLINE# #INDENT# #NEWLINE# #UNINDENT# } #NEWLINE# fp = open ( fname , 'r' ) #NEWLINE# for line in fp : #NEWLINE# #INDENT# line = line . rstrip ( '\r\n' ) #NEWLINE# try : #NEWLINE# #INDENT# ( k , v ) = line . split ( '=' , 1 ) #NEWLINE# #UNINDENT# except ValueError : #NEWLINE# #INDENT# continue #NEWLINE# #UNINDENT# retval [ retval ] = v #NEWLINE# #UNINDENT# return retval