def set_display_mode(self, zoom,layout='<STR_LIT>'):
if(zoom=='<STR_LIT>' or zoom=='<STR_LIT>' or zoom=='<STR_LIT>' or zoom=='<STR_LIT:default>' or not isinstance(zoom,basestring)):<EOL><INDENT>self.zoom_mode=zoom<EOL><DEDENT>else:<EOL><INDENT>self.error('<STR_LIT>'+zoom)<EOL><DEDENT>if(layout=='<STR_LIT>' or layout=='<STR_LIT>' or layout=='<STR_LIT>' or layout=='<STR_LIT:default>'):<EOL><INDENT>self.layout_mode=layout<EOL><DEDENT>else:<EOL><INDENT>self.error('<STR_LIT>'+layout)<EOL><DEDENT>
Set display mode in viewer

        The "zoom" argument may be 'fullpage', 'fullwidth', 'real',
        'default', or a number, interpreted as a percentage.