STINNER Victor added the comment: Why not starting to use pathlib? pathlib.Path(path).resolve().is_dir(). ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue19629> _______________________________________