Hello Sheldon,

> Here is the part of the program that I need explained:
>
> host.download(name, name, 'b')  # remote, local, binary mode
Download file called "name" from host to a local file in the same name,
use binary mode.

> source = host.file('index.html', 'r')  # file-like object
Open a file (like built-in "open") on remote site in read mode

> target = host.file('newdir/index.html', 'w')  # file-like object
Open a file (like built-in "open") on remote site in write mode

> host.copyfileobj(source, target)  # similar to shutil.copyfileobj
Copy 1'st file to the second.

HTH,
Miki
http://pythonwise.blogspot.com/

-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to