astro py:docs

- Index
- Modules

### Navigation

- next »
- « previous |
- Astropy v0.3 »
- ASCII Tables (`astropy.io.ascii`) »
- FixedWidthSplitter

# FixedWidthSplitter

class `astropy.io.ascii.fixedwidth.``FixedWidthSplitter`

  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

  `bookend` | bool(x) -> bool
  `delimiter_pad` | str(object=’‘) -> string

  Methods Summary

  `join`(vals, widths) |

  Attributes Documentation

  `bookend` = False
  `delimiter_pad` = ''

  Methods Documentation

  `join`(vals, widths)