Commit 10a05937 authored by Manuela Kuhn's avatar Manuela Kuhn
Browse files

Changed fileformat from DOS to unix (Tango)

parent 8252afaa
#!/usr/bin/env python #!/usr/bin/env python
import socket import socket
import sys import sys
port = 50900 port = 50900
msgs = [ msgs = [
"set localTarget /space/projects/zeromq-data-transfer/data/target", "set localTarget /space/projects/zeromq-data-transfer/data/target",
"get localTarget", "get localTarget",
"set detectorDevice haspp06:10000/p06/eigerdectris/exp.01", "set detectorDevice haspp06:10000/p06/eigerdectris/exp.01",
"set filewriterDevice haspp06:10000/p06/eigerfilewriter/exp.01", "set filewriterDevice haspp06:10000/p06/eigerfilewriter/exp.01",
"set historySize 0", "set historySize 0",
"set storeData True", "set storeData True",
"set removeData True", "set removeData True",
'set whitelist ["localhost","zitpcx19282"]', 'set whitelist ["localhost","zitpcx19282"]',
"do start", "do start",
"exit", "exit",
] ]
host = socket.gethostname() host = socket.gethostname()
sckt = socket.socket(socket.AF_INET, socket.SOCK_STREAM) sckt = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
try: try:
sckt.connect((host, port)) sckt.connect((host, port))
except Exception, e: except Exception, e:
print "connect() failed", e print "connect() failed", e
sckt.close() sckt.close()
sys.exit() sys.exit()
for msg in msgs: for msg in msgs:
sckt.send( msg) sckt.send( msg)
print "sent (len %2d): %s" % (len(msg), msg) print "sent (len %2d): %s" % (len(msg), msg)
reply = sckt.recv(1024) reply = sckt.recv(1024)
print "recv (len %2d): %s " % (len( reply), reply) print "recv (len %2d): %s " % (len( reply), reply)
sckt.close() sckt.close()
This diff is collapsed.
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment