Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
如何使用 python 脚本执行 ftp 命令“put 'FILE_NAME'”?
我想将文件传输到使用 FTP 连接的处理器。
命令是 ftp> put "C:\filename"
我希望使用 python 脚本执行此操作。请在这方面提供帮助。
from subprocess import call call(['echo "put C:\filename" | ftp'])
这应该调用“ftp”命令并传递输入字符串“put C:\filename”