def load_file ( self , filename ) : with open ( filename , 'r' ) as sourcefile : self . set_string ( sourcefile . read ( ) )
python set the current file
Read in file contents and set the current string .
def load_file(self, filename):
        """Read in file contents and set the current string."""
        with open(filename, 'r') as sourcefile:
            self.set_string(sourcefile.read())