Add Linux support to tmc example
Replaces visa include with pyvisa, as visa use with PyVISA is being
deprecated.
#!/usr/bin/env python3
-import visa
+import pyvisa as visa
import time
import sys
@@ -142,8 +142,16 @@ def test_stall_ep0():
assert (inst.read_stb() == 0)
-
+os = sys.platform
+if os == "linux" or os == "linux2":
+ rm = visa.ResourceManager("@py")
+elif os == "darwin":
+ ## Not tested
+ print("Mac not tested\n");
+ sys.exit()
+elif os == "win32":
rm = visa.ResourceManager("/c/Windows/system32/visa64.dll")
+
reslist = rm.list_resources("USB?::?*::INSTR")
print(reslist)
