On Thu, 16 Feb 2006 14:07:55 +0800, Kenneth Xie <[EMAIL PROTECTED]> 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:

  [EMAIL PROTECTED]:~$ mkdir a a/b a/c a/d
  [EMAIL PROTECTED]:~$ mktap ftp --root a
  [EMAIL PROTECTED]:~$ twistd -f ftp.tap 
  [EMAIL PROTECTED]:~$ 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
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to