Next / Previous / Contents / Shipman's homepage

29. class BandSizeField: Band size field

This class inherits from FieldItem, but it doesn't have a .scanField() method, because the band size comes from the compiler's PageHeader object.
# - - - - -   c l a s s   B a n d S i z e F i e l d   - - - - -

class BandSizeField(FieldItem):
    '''Represents a band size from the page header.

      Exports: as inherited.

29.1. BandSizeField.flatten()

Flattens the band size field.
# - - -   B a n d S i z e F i e l d . f l a t t e n   - - -

    def flatten(bandSizeField):
        '''Flatten a band size field.
        if  bandSizeField is None:
            return BLANK_BAND_SIZE
            return bandSizeField.value.ljust(BAND_SIZE_L)