import socket
client = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
client.connect(('127.0.0.1', 36547))
client.send('teste'.encode())
5
from subprocess import check_output
check_output(['ls /home/kanazuchi/projetos/sockets'], shell=True)
b'classifiers250418.tgz\nclient.py\nfgconsole\nfotografia.data\nnew\nnn.tgz\npythonclub\nserver.py\nUntitled1.ipynb\nUntitled.ipynb\n'
f = open('/home/kanazuchi/projetos/sockets/classifiers250418.tgz', 'rb').read()
tamanho_f = len(f)
tamanho_f = str(tamanho_f)
print(tamanho_f)
1212149
client.send(tamanho_f.encode())
7
1212149