class documentation

class LineSplitter:

View In Hierarchy

Object to split a string at a given delimiter or at given places.

Parameters

delimiter : str, int, or sequence of ints, optional
If a string, character used to delimit consecutive fields. If an integer or a sequence of integers, width(s) of each field.
comments : str, optional
Character used to mark the beginning of a comment. Default is '#'.
autostrip : bool, optional
Whether to strip each individual field. Default is True.
Method __call__ Undocumented
Method __init__ Undocumented
Method ​_delimited​_splitter Chop off comments, strip, and split at delimiter.
Method ​_fixedwidth​_splitter Undocumented
Method ​_variablewidth​_splitter Undocumented
Method autostrip Wrapper to strip each member of the output of method.
Instance Variable ​_handyman Undocumented
Instance Variable comments Undocumented
Instance Variable delimiter Undocumented
Instance Variable encoding Undocumented
def __call__(self, line):

Undocumented

def __init__(self, delimiter=None, comments='#', autostrip=True, encoding=None):

Undocumented

def _delimited_splitter(self, line):
Chop off comments, strip, and split at delimiter.
def _fixedwidth_splitter(self, line):

Undocumented

def _variablewidth_splitter(self, line):

Undocumented

def autostrip(self, method):

Wrapper to strip each member of the output of method.

Parameters

method : function
Function that takes a single argument and returns a sequence of strings.

Returns

wrapped : function
The result of wrapping method. wrapped takes a single input argument and returns a list of strings that are stripped of white-space.
_handyman =

Undocumented

comments =

Undocumented

delimiter =

Undocumented

encoding =

Undocumented