Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@tdsmith
Created June 12, 2013 18:54
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tdsmith/5768065 to your computer and use it in GitHub Desktop.
Save tdsmith/5768065 to your computer and use it in GitHub Desktop.
ctypes.macholib.dyld.dyld_default_search
def dyld_default_search(name, env=None):
yield name
framework = framework_info(name)
if framework is not None:
fallback_framework_path = dyld_fallback_framework_path(env)
for path in fallback_framework_path:
yield os.path.join(path, framework['name'])
fallback_library_path = dyld_fallback_library_path(env)
for path in fallback_library_path:
yield os.path.join(path, os.path.basename(name))
if framework is not None and not fallback_framework_path:
for path in DEFAULT_FRAMEWORK_FALLBACK:
yield os.path.join(path, framework['name'])
if not fallback_library_path:
for path in DEFAULT_LIBRARY_FALLBACK:
yield os.path.join(path, os.path.basename(name))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment