Skip to content

Instantly share code, notes, and snippets.

@tfoote
Created November 13, 2015 03:11
Show Gist options
  • Save tfoote/fb1052a9255d0de8b231 to your computer and use it in GitHub Desktop.
Save tfoote/fb1052a9255d0de8b231 to your computer and use it in GitHub Desktop.
A simple script to run to validate rospkg's os detection
#!/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