Posts by open software • 13 points
2 posts
-
1
votes0
answers336
viewsQ: Send file via network with Python
Server #!/usr/bin/env python #-*-coding:utf-8;-*- import socket import os host = "127.0.0.1" port = 8080 addr = (host, port) skt = socket.socket(socket.AF_INET, socket.SOCK_STREAM) skt.bind(addr)…
-
0
votes1
answer30
viewsQ: File corrupts while trying to copy it
I was trying to copy a file using Python, but the file corrupts... Look at the code: #!/usr/bin/env python cf = raw_input("File: ") ds = raw_input("Destino: ") with open(cf,"rb") as fl: for l in…