Last active
June 1, 2017 06:11
-
-
Save qlkvg/02f85df1eaeca90735f70670675858a9 to your computer and use it in GitHub Desktop.
little extension for python openni2 library
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
@classmethod | |
def open_any_available(cls): | |
for cam in cls.enumerate_uris(): | |
try: | |
return cls(cam) | |
except OpenNIError: | |
pass | |
raise Exception("no available cams") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment