Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import socket
- s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
- s.connect(("localhost", 16834))
- sent = s.send("getcurrenttime\r\n")
- print sent
- while True:
- cmd = raw_input("Cmd: ")
- send = s.send("%s\r\n" % cmd)
- r = s.recv(64)
- print cmd, send, r
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement