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.
我想使用 sshfs 挂载一个远程目录。sshfs 从终端工作正常。但是如何从 python 脚本中调用它呢?
我尝试过这样的事情 - 但根本没有用。
import os cmd = "/usr/bin/sshfs giis@giis.co.in:/home/giis /mnt" os.system(cmd)
首先,您应该确保您的 sshfs 命令使用 shell 可以正常工作。然后,到这里查看许多使用 Python 的 subprocess 模块调用您的 sshfs 命令的示例