summaryrefslogtreecommitdiffstats
path: root/pyserver
diff options
context:
space:
mode:
authorVasilii Chernov <vchernov@inr.ru>2016-03-03 10:34:49 +0100
committerVasilii Chernov <vchernov@inr.ru>2016-03-03 10:34:49 +0100
commitee16e47966afe180d3c32e2b1d93301052894fac (patch)
tree56aecf261aaae57e28c08cef573ae6642ec5394d /pyserver
parent02d0026e2df2ba5c68c0c1a67aec4437c9e8e8f3 (diff)
parent195c28f3074486165b6e0935362810f8a1fb9531 (diff)
downloadpcitool-ee16e47966afe180d3c32e2b1d93301052894fac.tar.gz
pcitool-ee16e47966afe180d3c32e2b1d93301052894fac.tar.bz2
pcitool-ee16e47966afe180d3c32e2b1d93301052894fac.tar.xz
pcitool-ee16e47966afe180d3c32e2b1d93301052894fac.zip
Merge with http://ufo.kit.edu/ufo/log/csa/pcitool 369 revision
Diffstat (limited to 'pyserver')
-rw-r--r--pyserver/api_server.py2
-rw-r--r--pyserver/scripts/test_script.py10
-rw-r--r--pyserver/scripts/test_script2.py4
3 files changed, 15 insertions, 1 deletions
diff --git a/pyserver/api_server.py b/pyserver/api_server.py
index 736d521..7e8b7ef 100644
--- a/pyserver/api_server.py
+++ b/pyserver/api_server.py
@@ -516,7 +516,7 @@ class ApiServer(MultiThreadedHTTPServer):
#redirect logs to exeption
pcilib.redirect_logs_to_exeption()
#pass Pcipywrap to to server handler
- self.lib = pcilib.Pcilib(device, model)
+ self.lib = pcilib.pcilib(device, model)
def handler(*args):
PcilibServerHandler(self.lib, *args)
MultiThreadedHTTPServer.__init__(self, adress, handler)
diff --git a/pyserver/scripts/test_script.py b/pyserver/scripts/test_script.py
new file mode 100644
index 0000000..8f236e9
--- /dev/null
+++ b/pyserver/scripts/test_script.py
@@ -0,0 +1,10 @@
+import sys
+if sys.version_info >= (3,0):
+ import binascii
+
+def run(ctx, inpt):
+ if sys.version_info >= (3,0):
+ return binascii.a2b_uu('111')
+ else:
+ return bytearray('111')
+
diff --git a/pyserver/scripts/test_script2.py b/pyserver/scripts/test_script2.py
new file mode 100644
index 0000000..16e4adb
--- /dev/null
+++ b/pyserver/scripts/test_script2.py
@@ -0,0 +1,4 @@
+description='this is a test script'
+
+def run(ctx, inpt):
+ return ctx.get_registers_list();