(path)
return os.access(path, os.R_OK | os.W_OK)
Determine if the real uid/gid of the executing user has read and write
    permissions for a directory or a file.

    :param str path: The path to the directory or file to check permissions
                     for.
    :rtype: bool
    :returns: True if real uid/gid has read+write permissions, False otherwise.
Determine if the real uid/gid of the executing user has read and write
    permissions for a directory or a file.
Determine if the real uid / gid of the executing user has read and write permissions for a directory or a file .
def _has_readwrite(path):
    """
    Determine if the real uid/gid of the executing user has read and write
    permissions for a directory or a file.

    :param str path: The path to the directory or file to check permissions
                     for.
    :rtype: bool
    :returns: True if real uid/gid has read+write permissions, False otherwise.
    """
    return os.access(path, os.R_OK | os.W_OK)
def _has_readwrite ( path ) : return os . access ( path , os . R_OK | os . W_OK )