diff service/iot2/iot2_linux.nim @ 688:7ac46dc29517

get some iot2 tests going Ignore-this: cdfdf88f445f043aa5aa55f737f6b776
author drewp@bigasterisk.com
date Tue, 21 Jan 2020 23:59:45 -0800
parents
children e3eceee54937
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/service/iot2/iot2_linux.nim	Tue Jan 21 23:59:45 2020 -0800
@@ -0,0 +1,16 @@
+import nimpy
+
+proc setup_python(): PyObject =
+  let sys = pyImport("sys")
+  discard sys.path.extend([
+    ".", # for devices.py itself
+    "env/lib/python3.7/site-packages" # for deeper imports
+  ])
+
+  pyImport("devices")
+
+
+echo "iot2_linux starting"
+
+let devices = setup_python()
+discard devices.hello()