Python中的一行ftp服务器 [英] One line ftp server in python

查看:131
本文介绍了Python中的一行ftp服务器的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否可以在python中使用一行命令来执行简单的ftp服务器?我希望能够做到这一点,而不必安装ftp服务器就可以将文件传输到Linux机箱。最好使用内置的python库,这样就没有什么额外的安装了。

Is it possible to have a one line command in python to do a simple ftp server? I'd like to be able to do this as quick and temporary way to transfer files to a linux box without having to install a ftp server. Preferably a way using built in python libraries so there's nothing extra to install.

推荐答案

强制扭曲示例:

Obligatory Twisted example:

twistd -n ftp

可能有用:

And probably useful:

twistd ftp --help

Usage: twistd [options] ftp [options].
WARNING: This FTP server is probably INSECURE do not use it.
Options:
  -p, --port=           set the port number [default: 2121]
  -r, --root=           define the root of the ftp-site. [default:
                    /usr/local/ftp]
  --userAnonymous=  Name of the anonymous user. [default: anonymous]
  --password-file=  username:password-style credentials database
  --version         
  --help            Display this help and exit.

这篇关于Python中的一行ftp服务器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆