ftputil 1.0 - a higher level interface for FTP sessions 
Author Message
 ftputil 1.0 - a higher level interface for FTP sessions

Hello Pythoneers :)

I would like to announce ftputil.py, a module which provides a
more friendly interface for FTP sessions than the ftplib module.

The FTPHost objects generated from it allow many operations similar
to those of os and os.path. Examples:

  # download some files from the login directory
  import ftputil
  host = ftputil.FTPHost('ftp.domain.com', 'user', 'secret')
  names = host.listdir(host.curdir)
  for name in names:
      if host.path.isreg(name):
          host.download(name, name, 'b')  # remote, local, binary mode

  # make a new directory and copy a remote file into it
  host.mkdir('newdir')
  source = host.file('index.html', 'r')  # file-like object
  target = host.file('newdir/index.html', 'w')  # file-like object
  host.copyfileobj(source, target)  # mimics shutil.copyfileobj
  source.close()
  target.close()

Even host.path.walk works. :-) But slow. ;-)

ftputil.py can be downloaded from
http://www.*-*-*.com/

I would like to get your suggestions and comments. :-)

Stefan

P.S.: Thanks to Pedro Rodriguez for his helpful answer to my question
in comp.lang.python :-)



Sat, 10 Jul 2004 07:10:17 GMT  
 
 [ 1 post ] 

 Relevant Pages 

1. ftputil 1.0 - a higher level interface for FTP sessions

2. Higher level FTP lib?

3. Higher level FTP lib?

4. Using the Binder "high level" interface

5. Higher level interface

6. Announcement: high-level user interface development for Oz/Mozart

7. python-xlib -- high-level interface?

8. High Level ASM and Low Level ASM

9. USENIX Very High Level Languages Symp.- PRE-REG DEADLINE 10/12

10. Symposium on Very High Level Languages

11. High Level Assembler question

12. FYI: IBM High Level Assembler parser available

 

 
Powered by phpBB® Forum Software