FixedWidthSplitter

class astropy.io.ascii.fixedwidth.FixedWidthSplitter [edit on github][source]

Bases: astropy.io.ascii.core.BaseSplitter

Split line based on fixed start and end positions for each col in self.cols.

This class requires that the Header class will have defined col.start and col.end for each column. The reference to the header.cols gets put in the splitter object by the base Reader.read() function just in time for splitting data lines by a data object.

Note that the start and end positions are defined in the pythonic style so line[start:end] is the desired substring for a column. This splitter class does not have a hook for process_lines since that is generally not useful for fixed-width input.

Attributes Summary

delimiter_pad str(object) -> string
bookend bool(x) -> bool

Methods Summary

join(vals, widths)

Attributes Documentation

delimiter_pad = ''
bookend = False

Methods Documentation

join(vals, widths) [edit on github][source]

Page Contents