class documentation

class LineSplitter: (source)

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 autostrip Wrapper to strip each member of the output of method.
Instance Variable comments Undocumented
Instance Variable delimiter Undocumented
Instance Variable encoding Undocumented
Method _delimited_splitter Chop off comments, strip, and split at delimiter.
Method _fixedwidth_splitter Undocumented
Method _variablewidth_splitter Undocumented
Instance Variable _handyman Undocumented
def __call__(self, line): (source)

Undocumented

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

Undocumented

def autostrip(self, method): (source)

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.
comments = (source)

Undocumented

delimiter = (source)

Undocumented

encoding = (source)

Undocumented

def _delimited_splitter(self, line): (source)

Chop off comments, strip, and split at delimiter.

def _fixedwidth_splitter(self, line): (source)

Undocumented

def _variablewidth_splitter(self, line): (source)

Undocumented

_handyman = (source)

Undocumented