hi!
i want to write a ftp server.

i started writing:

from socket import *

    server= socket(AF_INET, SOCK_STREAM)
    server.bind(("0.0.0.0", 21))
    server.listen(5)
    while(1):
       (client_s,client_addr)=server.accept()
       command=client_s.recv(1000)
       print command
       client_s.close()

i run it and wrote in the internet explorer: ftp://localhost
but nothing happen.. it doesnt print the recieved command.

what can i do? please someone can give me an example for a ftp server??

thank you very much.
Shay .

Member Avatar for iamthwee

Why reinvent the wheel, there are libraries for this already in python.

which libaries?
i found ftplib, but its for ftp client.. not server.

:(

I found this link, which should work.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.