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