(self, args)
WIDTH: set width of screen or device.
WIDTH: set width of screen or device.
WIDTH : set width of screen or device .
def width_(self, args):
        """WIDTH: set width of screen or device."""
        file_or_device = next(args)
        num_rows_dummy = None
        if file_or_device == tk.LPRINT:
            dev = self.lpt1_file
            w = values.to_int(next(args))
        elif isinstance(file_or_device, values.Number):
            file_or_device = values.to_int(file_or_device)
            error.range_check(0, 255, file_or_device)
            dev = self.get(file_or_device, mode=b'IOAR')
            w = values.to_int(next(args))
        else:
            expr = next(args)
            if isinstance(expr, values.String):
                devname = expr.to_str().upper()
                w = values.to_int(next(args))
                try:
                    dev = self._devices[devname].device_file
                except (KeyError, AttributeError):
                    # bad file name
                    raise error.BASICError(error.BAD_FILE_NAME)
            else:
                w = values.to_int(expr)
                num_rows_dummy = next(args)
                if num_rows_dummy is not None:
                    num_rows_dummy = values.to_int(num_rows_dummy)
                dev = self.scrn_file
        error.range_check(0, 255, w)
        list(args)
        if num_rows_dummy is not None:
            self.scrn_file._display.set_height(num_rows_dummy)
        dev.set_width(w)
def width_ ( self , args ) : file_or_device = next ( args ) num_rows_dummy = None if file_or_device == tk . LPRINT : dev = self . lpt1_file w = values . to_int ( next ( args ) ) elif isinstance ( file_or_device , values . Number ) : file_or_device = values . to_int ( file_or_device ) error . range_check ( 0 , 255 , file_or_device ) dev = self . get ( file_or_device , mode = b'IOAR' ) w = values . to_int ( next ( args ) ) else : expr = next ( args ) if isinstance ( expr , values . String ) : devname = expr . to_str ( ) . upper ( ) w = values . to_int ( next ( args ) ) try : dev = self . _devices [ devname ] . device_file except ( KeyError , AttributeError ) : # bad file name raise error . BASICError ( error . BAD_FILE_NAME ) else : w = values . to_int ( expr ) num_rows_dummy = next ( args ) if num_rows_dummy is not None : num_rows_dummy = values . to_int ( num_rows_dummy ) dev = self . scrn_file error . range_check ( 0 , 255 , w ) list ( args ) if num_rows_dummy is not None : self . scrn_file . _display . set_height ( num_rows_dummy ) dev . set_width ( w )