Skip to content

Instantly share code, notes, and snippets.

@qlkvg
Last active June 1, 2017 06:11
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save qlkvg/02f85df1eaeca90735f70670675858a9 to your computer and use it in GitHub Desktop.
Save qlkvg/02f85df1eaeca90735f70670675858a9 to your computer and use it in GitHub Desktop.
little extension for python openni2 library
@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