FAQ
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/

Search Discussions

Discussion Posts

Previous

Follow ups

Related Discussions

Discussion Navigation
viewthread | post
posts ‹ prev | 2 of 3 | next ›
Discussion Overview
grouppython-list @
categoriespython
postedMay 24, '06 at 7:14a
activeMay 24, '06 at 10:32a
posts3
users2
websitepython.org

2 users in discussion

Sheldon: 2 posts Miki: 1 post

People

Translate

site design / logo © 2022 Grokbase