'Internal: raise an IOError if file is not writable'

def _checkWritable(self, msg=None):

    if (not self.writable()):
        raise IOError((u'File    or    stream    is    not    writable.' if (msg is None) else msg))
