Created
November 13, 2015 03:11
-
-
Save tfoote/fb1052a9255d0de8b231 to your computer and use it in GitHub Desktop.
A simple script to run to validate rospkg's os detection
This file contains 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 | |
from rospkg.os_detect import OsDetect, OsNotDetected | |
try: | |
d = OsDetect() | |
n, v, c = d.detect_os() | |
print('Detected name: "%s", version: "%s", codename: "%s"' % (n, v, c)) | |
except OsNotDetected as ex: | |
print(str(ex)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment