aboutsummaryrefslogtreecommitdiff
path: root/bindings/python/example.py
diff options
context:
space:
mode:
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())
+