aboutsummaryrefslogtreecommitdiff
path: root/bindings/python/example.py
diff options
context:
space:
mode:
authorJustin Berger <j.david.berger@gmail.com>2018-04-04 10:42:51 -0600
committerJustin Berger <j.david.berger@gmail.com>2018-04-04 10:42:51 -0600
commitd6d310fdd13c11382f37faca6a0c20b361ae9c40 (patch)
tree467255b0c0718f58e4b89a110fa1477d1d81dd8f /bindings/python/example.py
parentd438c5b16f42700c8ff541269759d6c585959729 (diff)
downloadlibsurvive-d6d310fdd13c11382f37faca6a0c20b361ae9c40.tar.gz
libsurvive-d6d310fdd13c11382f37faca6a0c20b361ae9c40.tar.bz2
Added python binding
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..5454fbc
--- /dev/null
+++ b/bindings/python/example.py
@@ -0,0 +1,13 @@
+import libsurvive
+import sys
+
+actx = libsurvive.AsyncContext(sys.argv)
+
+for obj in actx.Objects():
+ print(obj.Name())
+
+while actx.Running():
+ updated = actx.NextUpdated()
+ if updated:
+ print(updated.Name(), updated.Pose())
+