(filename)
Read a file into a string
Read a file into a string
Read a file into a string
def read_file(filename):
    """Read a file into a string"""
    path = os.path.abspath(os.path.dirname(__file__))
    filepath = os.path.join(path, filename)
    try:
        return open(filepath).read()
    except IOError:
        return ''
def read_file ( filename ) : path = os . path . abspath ( os . path . dirname ( __file__ ) ) filepath = os . path . join ( path , filename ) try : return open ( filepath ) . read ( ) except IOError : return ''