Created
May 21, 2012 23:33
-
-
Save lorenzoriano/2765394 to your computer and use it in GitHub Desktop.
Get Paths Script
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
import sys | |
rospkgs = sys.argv[1:] | |
import roslib | |
for rospkg in rospkgs: | |
roslib.load_manifest(rospkg) | |
paths = [path for path in sys.path if not path.startswith('/usr')] | |
#create a set to remove repetitions | |
path_set = set(paths) | |
pathstr = ':'.join(path_set) | |
print pathstr |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment