def add_dependency(name, first=False):
 dep_paths = generate_dependency_paths(name)
 for path in dep_paths.values():
  if os.path.exists(encode(path)):
   add(path, first=first)

def add_dependency ( name , first = False ) : dep_paths = generate_dependency_paths ( name ) for path in dep_paths . values ( ) : if os . path . exists ( encode ( path ) ) : add ( path , first = first )
accepts a dependency name and automatically adds the appropriate path to sys .