annotate 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
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
688
7ac46dc29517 get some iot2 tests going
drewp@bigasterisk.com
parents:
diff changeset
1 import nimpy
7ac46dc29517 get some iot2 tests going
drewp@bigasterisk.com
parents:
diff changeset
2
7ac46dc29517 get some iot2 tests going
drewp@bigasterisk.com
parents:
diff changeset
3 proc setup_python(): PyObject =
7ac46dc29517 get some iot2 tests going
drewp@bigasterisk.com
parents:
diff changeset
4 let sys = pyImport("sys")
7ac46dc29517 get some iot2 tests going
drewp@bigasterisk.com
parents:
diff changeset
5 discard sys.path.extend([
7ac46dc29517 get some iot2 tests going
drewp@bigasterisk.com
parents:
diff changeset
6 ".", # for devices.py itself
7ac46dc29517 get some iot2 tests going
drewp@bigasterisk.com
parents:
diff changeset
7 "env/lib/python3.7/site-packages" # for deeper imports
7ac46dc29517 get some iot2 tests going
drewp@bigasterisk.com
parents:
diff changeset
8 ])
7ac46dc29517 get some iot2 tests going
drewp@bigasterisk.com
parents:
diff changeset
9
7ac46dc29517 get some iot2 tests going
drewp@bigasterisk.com
parents:
diff changeset
10 pyImport("devices")
7ac46dc29517 get some iot2 tests going
drewp@bigasterisk.com
parents:
diff changeset
11
7ac46dc29517 get some iot2 tests going
drewp@bigasterisk.com
parents:
diff changeset
12
7ac46dc29517 get some iot2 tests going
drewp@bigasterisk.com
parents:
diff changeset
13 echo "iot2_linux starting"
7ac46dc29517 get some iot2 tests going
drewp@bigasterisk.com
parents:
diff changeset
14
7ac46dc29517 get some iot2 tests going
drewp@bigasterisk.com
parents:
diff changeset
15 let devices = setup_python()
7ac46dc29517 get some iot2 tests going
drewp@bigasterisk.com
parents:
diff changeset
16 discard devices.hello()