ganeti :: utils :: text :: LineSplitter :: Class LineSplitter
[hide private]
[frames] | no frames]

Class LineSplitter

source code


Splits data chunks into lines separated by newline.

Instances provide a file-like interface.

Instance Methods [hide private]
 
__init__(self, line_fn, *args)
Initializes this class.
source code
 
write(self, data) source code
 
flush(self) source code
 
close(self) source code

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

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, line_fn, *args)
(Constructor)

source code 

Initializes this class.

Parameters:
  • line_fn (callable) - Function called for each line, first parameter is line
  • args - Extra arguments for line_fn
Overrides: object.__init__