tags:

views:

121

answers:

1

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)
+1  A: 

first, you should make sure your sshfs command works fine using the shell. Then, go to here to see many examples of using subprocess module of Python to call your sshfs commmand

ghostdog74