实现TFTP、FTP、SFTP服务器的Python包

标签 python python-2.7 ftp sftp tftp

我正在使用tftpy在我的 Python 程序中创建 TFTP 服务器,效果惊人。但是,我需要其他类型的服务器:TFTP、FTP、SFTP。我可以使用什么包来支持所有这些?

最佳答案

每个协议(protocol)都需要自己的实现,例如:

但是,如果您坚持使用一个包来统治所有这些,并且不介意弄脏您的手,PycURL适合您:

PycURL is a Python interface to libcurl. PycURL can be used to fetch objects identified by a URL from a Python program, similar to the urllib Python module. PycURL is mature, very fast, and supports a lot of features.

libcurl is a free and easy-to-use client-side URL transfer library, supporting FTP, FTPS, HTTP, HTTPS, SCP, SFTP, TFTP, TELNET, DICT, LDAP, LDAPS, FILE, IMAP, SMTP, POP3 and RTSP. libcurl supports SSL certificates, HTTP POST, HTTP PUT, FTP uploading, HTTP form based upload, proxies, cookies, user+password authentication (Basic, Digest, NTLM, Negotiate, Kerberos4), file transfer resume, http proxy tunneling and more!

有关 PycURL 的代码示例,请查看 herehere .

关于实现TFTP、FTP、SFTP服务器的Python包,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/23005565/

相关文章:

java - Java 中的 FTP 单元测试(JSch 和 MockFtpServer)

linux - 使用 cURL 命令从 SFTP 服务器获取 .listing 文件的命令是什么

python - 简单的批处理文件问题

python - 如何为python自定义类进行类型转换

ssh - 通过慢速连接通过 SFTP 上传到临时位置,然后移动到真实位置

python - 使用 subprocess.Popen() 或 subprocess.check_call() 时程序卡住

python-2.7 - 非凸优化器

python - 从具有 DenseVector 行的 pyspark 数据框中获取行的最大值

python - Spark : use reduceByKey instead of groupByKey and mapByValues

python - 如何覆盖当前时间?