#NEWLINE# def from_filename( cls , filename , namespace = None , encoding = None ) : #NEWLINE# #INDENT# f = open ( filename , 'rb' ) #NEWLINE# c = f . read ( ) #NEWLINE# f . close ( ) #NEWLINE# if encoding : #NEWLINE# #INDENT# c = c . decode ( encoding ) #NEWLINE# #UNINDENT# return cls ( content = c , name = filename , namespace = namespace )