Vote Up 0 Vote Down

python download and upload to client

I want to make a server client program in which server gives option of download and upload to client. . .
And client choose the option that what he wants to do. ..
But i dont know how to download and upload using python. .
'here server and client are two pc not website'
flag

Answers


Vote Up 0 Vote Down
u need to use some kind of protocol like FTP for exemple, search for Library that support FTP. Or open the file in python in binary mode copy the data, split it in a fixed strings and send them one by one, then at the other side write that file again. if you're familiare with socket in python it's easy easy to send string. just google: basic socket server/client in python
flag | link |
Vote Up 0 Vote Down
If you are on the same network, you just need to have the ip address of the server. The server needs to wait for a client connections, the client can just send data. The server should ideally have a static ip, which can set on the router if you are the admin of the network. if the server doesn't have a static IP, you need to have the client scan through the range of IPs looking for the server, Ideally, the server has a set public key, and would respond with a signature that you can use to verify that it is the machine you mean to contact.
flag | link |

Your Answer

Login before answering

Login with facebook