Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import socket
- s = socket.socket()
- host = 'csmpop.ddns.net'
- port = [33331]
- s.connect((host,port))
- student_id = 's5067168'
- print "Requesting archive with ID: {}".format(student_id)
- s.send(student_id)
- f = open('received_files.zip','wb')
- l = s.recv(1024)
- while (l):
- print "Receiving..."
- f.write(l)
- l = s.recv(1024)
- f.close()
- print "Done Receiving"
- s.shutdown(socket.SHUT_WR)
- s.close()
Add Comment
Please, Sign In to add comment