def _writable_dir(path):
 return (os.path.isdir(path) and os.access(path, os.W_OK))

def _writable_dir ( path ) : return ( os . path . isdir ( path ) and os . access ( path , os . W_OK ) )
whether path is a directory .