The rospkg Python module provides basic utilities for querying information
about ROS packages, stacks, and distributions. There are several basic APIs:
ROS environment, RosPack/RosStack, OS detection, and distributions.

The environment APIs enable access to environment settings that define the ROS
package/stack filesystem configuration. The RosPack and RosStack APIs are
similar to the rospack and rosstack command-line tools and provide information
about dependency, location, and other package/stack metadata. The Manifest
class provides access to a specific package/stack’s manifest information. NOTE:
the Manifest class API is still volatile. Where possible, use the relevant
RosPack/RosStack APIs to access manifest-related information instead
(e.g. dependency relationships).

The rospkg.distro sub-module provides access to ROS distribution files, which
describe collections of ROS stacks releases. This API is module is still
unstable and mainly supports internal tools.

Homepage:
http://ros.org/wiki/rospkg
