diff options
Diffstat (limited to 'pyserver')
-rw-r--r-- | pyserver/api_server.py | 2 | ||||
-rw-r--r-- | pyserver/scripts/test_script.py | 10 | ||||
-rw-r--r-- | pyserver/scripts/test_script2.py | 4 |
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(); |