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.

baseclasses.py
# - - - - -   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.

baseclasses.py
# - - -   B a n d S i z e F i e l d . f l a t t e n   - - -

#   @staticmethod
    def flatten ( bandSizeField ):
        """Flatten a band size field.
        """
        if  bandSizeField is None:
            return BLANK_BAND_SIZE
        else:
            return bandSizeField.value.ljust ( BAND_SIZE_L )

    flatten  =  staticmethod ( flatten )