Back to index

python3.2  3.2.2
Public Member Functions | Public Attributes
ftpmirror.LoggingFile Class Reference

List of all members.

Public Member Functions

def __init__
def write
def close

Public Attributes

 fp
 bytes
 hashes
 blocksize
 outfp

Detailed Description

Definition at line 337 of file ftpmirror.py.


Constructor & Destructor Documentation

def ftpmirror.LoggingFile.__init__ (   self,
  fp,
  blocksize,
  outfp 
)

Definition at line 338 of file ftpmirror.py.

00338 
00339     def __init__(self, fp, blocksize, outfp):
00340         self.fp = fp
00341         self.bytes = 0
00342         self.hashes = 0
00343         self.blocksize = blocksize
        self.outfp = outfp

Member Function Documentation

Definition at line 352 of file ftpmirror.py.

00352 
00353     def close(self):
00354         self.outfp.write('\n')

Here is the caller graph for this function:

def ftpmirror.LoggingFile.write (   self,
  data 
)

Definition at line 344 of file ftpmirror.py.

00344 
00345     def write(self, data):
00346         self.bytes = self.bytes + len(data)
00347         hashes = int(self.bytes) / self.blocksize
00348         while hashes > self.hashes:
00349             self.outfp.write('#')
00350             self.outfp.flush()
00351             self.hashes = self.hashes + 1
        self.fp.write(data)

Member Data Documentation

Definition at line 342 of file ftpmirror.py.

Definition at line 340 of file ftpmirror.py.

Definition at line 339 of file ftpmirror.py.

Definition at line 341 of file ftpmirror.py.

Definition at line 343 of file ftpmirror.py.


The documentation for this class was generated from the following file: