'read from file'

def read(self):

    if ((self.filename is None) or (not self.file_exists())):
        return None
    contents = None
    with open(self.filename) as yfd:
        contents = yfd.read()
    return contents
