def get_files():
files_root = path.join(path.dirname(__file__), '<STR_LIT>')<EOL>for root, dirs, files in walk(files_root):<EOL><INDENT>rel_root = path.relpath(root, files_root)<EOL>for file_name in files:<EOL><INDENT>try:<EOL><INDENT>f = open(path.join(root, file_name), '<STR_LIT:r>', encoding='<STR_LIT:utf-8>')<EOL>with f:<EOL><INDENT>yield rel_root, file_name, f.read(), True<EOL><DEDENT><DEDENT>except UnicodeError:<EOL><INDENT>f = open(path.join(root, file_name), '<STR_LIT:rb>')<EOL>with f:<EOL><INDENT>yield rel_root, file_name, f.read(), False<EOL><DEDENT><DEDENT><DEDENT><DEDENT>
Read all the template's files