Beispiel #1
0
 def send(self, name, packet, *args):
     if self._symmetrical:
         namedArgs = dict()
         names = list(packet['args'])
         for i in range(len(args)):
             namedArgs[names[i]] = args[i]
         symmetrical(self._proto_name, name, namedArgs)
         args = list(map(lambda x: namedArgs[x], namedArgs))
     formats = list(map(lambda x: packet['args'][x], list(packet['args'])))
     encode(self._stream, packet['id'], list(zip(args, formats)))
Beispiel #2
0
 def send(self, name, packet, *args):
     formats = list(map(lambda x: packet['args'][x], list(packet['args'])))
     encode(self._stream, packet['id'], list(zip(args, formats)))
Beispiel #3
0
 def send(self, name, packet, *args):
     formats = list(map(lambda x: packet['args'][x], list(packet['args'])))
     encode(self._stream, packet['id'], list(zip(args, formats)))
Beispiel #4
0
#!/usr/bin/env python3

from atp import encode
import sys

if len(sys.argv) < 2:
    print('Usage: [id] [value@type] [value@type] …', file=sys.stderr)
    exit()

encode(sys.stdout.buffer, sys.argv[1],
       list(map(lambda x: x.split('@'), sys.argv[2:])))
Beispiel #5
0
#!/usr/bin/env python3

from atp import encode
import sys

if len(sys.argv) < 2:
    print("Usage: [id] [value@type] [value@type] …", file=sys.stderr)
    exit()

encode(sys.stdout.buffer, sys.argv[1], list(map(lambda x: x.split("@"), sys.argv[2:])))