def readonly(self, ro=None):
    '\n        Sets or check the readonly status of this CDF\n\n        If the CDF has been changed since opening, setting readonly mode\n        will have no effect.\n\n        .. note::\n            Closing a CDF that has been opened readonly, or setting readonly\n            False, may take a substantial amount of time if there are many\n            variables in the CDF, as a (potentially large) cache needs to\n            be cleared. Consider specifying ``readonly=False`` when opening\n            the file if this is an issue. However, this may make some reading\n            operations slower.\n\n        Other Parameters\n        ================\n        ro : Boolean\n            True to set the CDF readonly, False to set it read/write,\n            or leave out to check only.\n\n        Returns\n        =======\n        out : Boolean\n            True if CDF is read-only, else False\n\n        Raises\n        ======\n        CDFError : if bad mode is set\n        '
    if (ro == True):
        self._call(const.SELECT_, const.CDF_READONLY_MODE_, const.READONLYon)
    elif (ro == False):
        self._call(const.SELECT_, const.CDF_READONLY_MODE_, const.READONLYoff)
    mode = ctypes.c_long(0)
    self._call(const.CONFIRM_, const.CDF_READONLY_MODE_, ctypes.byref(mode))
    if (mode.value == const.READONLYon.value):
        return True
    elif (mode.value == const.READONLYoff.value):
        return False
    else:
        raise CDFError(const.BAD_READONLY_MODE.value)
Sets or check the readonly status of this CDF

If the CDF has been changed since opening, setting readonly mode
will have no effect.

.. note::
    Closing a CDF that has been opened readonly, or setting readonly
    False, may take a substantial amount of time if there are many
    variables in the CDF, as a (potentially large) cache needs to
    be cleared. Consider specifying ``readonly=False`` when opening
    the file if this is an issue. However, this may make some reading
    operations slower.

Other Parameters
================
ro : Boolean
    True to set the CDF readonly, False to set it read/write,
    or leave out to check only.

Returns
=======
out : Boolean
    True if CDF is read-only, else False

Raises
======
CDFError : if bad mode is set
def readonly(self, ro=None):
    '\n        Sets or check the readonly status of this CDF\n\n        If the CDF has been changed since opening, setting readonly mode\n        will have no effect.\n\n        .. note::\n            Closing a CDF that has been opened readonly, or setting readonly\n            False, may take a substantial amount of time if there are many\n            variables in the CDF, as a (potentially large) cache needs to\n            be cleared. Consider specifying ``readonly=False`` when opening\n            the file if this is an issue. However, this may make some reading\n            operations slower.\n\n        Other Parameters\n        ================\n        ro : Boolean\n            True to set the CDF readonly, False to set it read/write,\n            or leave out to check only.\n\n        Returns\n        =======\n        out : Boolean\n            True if CDF is read-only, else False\n\n        Raises\n        ======\n        CDFError : if bad mode is set\n        '
    if (ro == True):
        self._call(const.SELECT_, const.CDF_READONLY_MODE_, const.READONLYon)
    elif (ro == False):
        self._call(const.SELECT_, const.CDF_READONLY_MODE_, const.READONLYoff)
    mode = ctypes.c_long(0)
    self._call(const.CONFIRM_, const.CDF_READONLY_MODE_, ctypes.byref(mode))
    if (mode.value == const.READONLYon.value):
        return True
    elif (mode.value == const.READONLYoff.value):
        return False
    else:
        raise CDFError(const.BAD_READONLY_MODE.value)