file transfer question
Ali Dada
afd00 at aub.edu.lb
Mon Apr 28 17:19:58 EDT 2003
hi all:
i want to read a file from a network pc and use it in a local python script. i
thought of an easy way: i log on from within the python script to the host pc
using ssh then copy the file to my working directory using scp. below is the code:
import os
os.popen('ssh username at hostname')
os.popen('scp username at hostname:~/requiredFile ./copiedFile')
but what's happening is that when i execute the code, i get prompted for the
password by ssh, so i enter it, and then the program freezes and i can do
nothing. how do you think i should alter the code? thanks in advance..
----------
Ali Dada
More information about the Python-list
mailing list