Package PyFoam :: Package Basics :: Module LineReader :: Class LineReader
[hide private]
[frames] | no frames]

Class LineReader

source code

object --+
         |
        LineReader

Read a line from a file

The line is stripped of whitespaces at the start and the end of the line and stored in a variable self.line

Instance Methods [hide private]
 
__init__(self)
x.__init__(...) initializes x; see x.__class__.__doc__ for signature
source code
 
bytesRead(self)
Returns: number of bytes that were already read
source code
 
userSaidStop(self)
Returns: whether the reader caught a Keyboard-interrupt
source code
 
read(self, fh)
reads the next line
source code

Inherited from object: __delattr__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __str__

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self)
(Constructor)

source code 

x.__init__(...) initializes x; see x.__class__.__doc__ for signature

Overrides: object.__init__
(inherited documentation)

bytesRead(self)

source code 
Returns:
number of bytes that were already read

userSaidStop(self)

source code 
Returns:
whether the reader caught a Keyboard-interrupt

read(self, fh)

source code 

reads the next line

fh - filehandle to read from

Return value: False if the end of the file was reached. True otherwise