Next / Previous / Contents / Shipman's homepage

31. pageDimsFactory()

This function manufactures a new PageDims instance, given one of the specific paper size and orientation codes defined in Section 10.3, “The PAPER sizes”. For the dictionary mapping these codes to factory functions, see Section 36, “paperTypeMap.

fosox.py
# - - -   p a g e D i m s F a c t o r y

def pageDimsFactory ( paperType ):
    '''Create a new PageDims instance for a standard sheet size.
    '''
    return paperTypeMap[paperType]()