aboutsummaryrefslogtreecommitdiff
path: root/bindings/python/example.py
diff options
context:
space:
mode:
authorjdavidberger <j.david.berger@gmail.com>2018-04-11 10:51:45 -0600
committerGitHub <noreply@github.com>2018-04-11 10:51:45 -0600
commit0cd7e8d9783e8cdff7be99a330b2096a0648b192 (patch)
tree09fa3f286dc20d87448220a4f7800fd0e3f04087 /bindings/python/example.py
parent7af7eec04bc03719aa6b2879fe599ff0cf43e032 (diff)
parent8469de349450efb8e71fd0735bfe2dd6d3c62063 (diff)
downloadlibsurvive-0cd7e8d9783e8cdff7be99a330b2096a0648b192.tar.gz
libsurvive-0cd7e8d9783e8cdff7be99a330b2096a0648b192.tar.bz2
Merge pull request #123 from cnlohr/simple_api
Simple async api
Diffstat (limited to 'bindings/python/example.py')
-rw-r--r--bindings/python/example.py13
1 files changed, 13 insertions, 0 deletions
diff --git a/bindings/python/example.py b/bindings/python/example.py
new file mode 100644
index 0000000..32d58de
--- /dev/null
+++ b/bindings/python/example.py
@@ -0,0 +1,13 @@
+import libsurvive
+import sys
+
+actx = libsurvive.SimpleContext(sys.argv)
+
+for obj in actx.Objects():
+ print(obj.Name())
+
+while actx.Running():
+ updated = actx.NextUpdated()
+ if updated:
+ print(updated.Name(), updated.Pose())
+