def try_load_pkg_data(name): try: return pkgutil.get_data(__name__, name) except ValueError: return open(name, "rb").read()