#NEWLINE# def _GetFileContents( filename ) : #NEWLINE# #INDENT# "Tries to find the given filename on disk or via pkgutil.get_data.\n\n  Args:\n    filename: String name of the file.\n\n  Returns:\n    A tuple containing the absolute path to the requested file and the file's\n    contents. If the file is not actually on disk, the file path will be None.\n  " #NEWLINE# fpath = os . path . join ( PROGRAM_FILES_DIR , filename ) #NEWLINE# if os . path . isfile ( fpath ) : #NEWLINE# #INDENT# with open ( fpath , 'r' ) as f : #NEWLINE# #INDENT# content = f . read ( ) #NEWLINE# #UNINDENT# #UNINDENT# else : #NEWLINE# #INDENT# content = pkgutil . get_data ( 'gslib' , filename ) #NEWLINE# fpath = None #NEWLINE# #UNINDENT# return ( fpath , content . strip ( ) )