sshfs

How to mount and unmount a folder with sshfs and Python Subprocess?

How to mount and unmount a folder with sshfs and Python Subprocess? Question: I want to be able to mount and then unmount a directory calling sshfs from the Python subproccess module. Here is the code I am using to accomplish this. import subprocess mkdir_command = ‘mkdir {}’.format(local_data_directory) unmount_command = ‘umount {}’.format(local_data_directory) mount_command = ‘sshfs …

Total answers: 2

how to invoke sshfs within python script?

how to invoke sshfs within python script? Question: I want to mount a remote directory using sshfs. sshfs working fine from terminal. But how to invoke it from within python script? I tried something like this – but didn’t work at all. import os cmd = “/usr/bin/sshfs [email protected]:/home/giis /mnt” os.system(cmd) Asked By: webminal.org || Source …

Total answers: 2