(s)
return stat.S_ISDIR(st.st_mode)
Return true if the pathname refers to an existing directory.
Return true if the pathname refers to an existing directory.
Return true if the pathname refers to an existing directory .
def isdir(s):
    """Return true if the pathname refers to an existing directory."""
    try:
        st = os.stat(s)
    except (OSError, ValueError):
        return False
    return stat.S_ISDIR(st.st_mode)
def isdir ( s ) : try : st = os . stat ( s ) except ( OSError , ValueError ) : return False return stat . S_ISDIR ( st . st_mode )