[Tutor] os.is_file and os.is_dir missing from CPython 3.8.0b?

Peter Otten __peter__ at web.de
Fri Jun 14 13:48:24 EDT 2019


Tom Hale wrote:

> I'm trying to use os.is_dir, but I'm not finding it or os.is_file.
> 
> What am I missing here?

Scroll up a bit in the documentation:

https://docs.python.org/3.8/library/os.html#os.DirEntry

Both is_file() and is_dir() are methods of the DirEntry object.

See also

https://docs.python.org/3.8/library/os.path.html#os.path.isfile



More information about the Tutor mailing list