any ftpd written in python?
Jean-Paul Calderone
exarkun at divmod.com
Thu Feb 16 09:17:41 EST 2006
On Thu, 16 Feb 2006 14:07:55 +0800, Kenneth Xie <mailinglist4ken at gmail.com> wrote:
>I need a simple ftpd example in pure python. Is there already such a
>ftpd available?
>Thank you very much in advance.
Twisted includes an FTP server:
exarkun at kunai:~$ mkdir a a/b a/c a/d
exarkun at kunai:~$ mktap ftp --root a
exarkun at kunai:~$ twistd -f ftp.tap
exarkun at kunai:~$ ftp localhost 2121
Connected to kunai.
220 Twisted SVN-Trunk FTP Server
Name (localhost:exarkun): anonymous
331 Guest login ok, type your email address as password.
Password:
230 Anonymous login ok, access restrictions apply.
Remote system type is UNIX.
Using binary mode to transfer files.
ftp> ls
200 PORT OK
125 Data connection already open, starting transfer
drwxr-xr-x 2 exarkun exarkun 4096 Feb 16 14:15 b
drwxr-xr-x 2 exarkun exarkun 4096 Feb 16 14:15 c
drwxr-xr-x 2 exarkun exarkun 4096 Feb 16 14:15 d
226 Transfer Complete.
ftp> quit
221 Goodbye.
Jean-Paul
More information about the Python-list
mailing list