def _generate_python_path(pkg, rospack):
 if (pkg in _bootstrapped):
  return []
 m = rospack.get_manifest(pkg)
 if m.is_catkin:
  _bootstrapped.append(pkg)
  return []
 packages = get_depends(pkg, rospack)
 packages.append(pkg)
 paths = []
 try:
  for p in packages:
   m = rospack.get_manifest(p)
   d = rospack.get_path(p)
   _append_package_paths(m, paths, d)
   _bootstrapped.append(p)
 except:
  if (pkg in _bootstrapped):
   _bootstrapped.remove(pkg)
  raise
 return paths

def _generate_python_path ( pkg , rospack ) : if ( pkg in _bootstrapped ) : return [ ] m = rospack . get_manifest ( pkg ) if m . is_catkin : _bootstrapped . append ( pkg ) return [ ] packages = get_depends ( pkg , rospack ) packages . append ( pkg ) paths = [ ] try : for p in packages : m = rospack . get_manifest ( p ) d = rospack . get_path ( p ) _append_package_paths ( m , paths , d ) _bootstrapped . append ( p ) except : if ( pkg in _bootstrapped ) : _bootstrapped . remove ( pkg ) raise return paths
recursive subroutine for building dependency list and python path :raises: :exc:rospkg .