class FTPSlient(object):
def __init__(self,host,port):
self.client = socket.socket()
self.client.connect((host,port))
def Communication(self):
while True:
msg = input(">>").strip()
if not msg:continue
self.client.send(msg.encode())
raed_data = self.client.recv(1024)
print(raed_data.decode())
if __name__ == "__main__":
slient = FTPSlient("localhost",9999)
slient.Communication()