2.8 pathlib#

Important

This lesson is still under development.

import os
from pathlib import Path

Path#

path = Path(os.getcwd())
print(path)
/home/docs/checkouts/readthedocs.org/user_builds/python-seekho/checkouts/dev/scripts/builtin_modules
print(type(path))
<class 'pathlib.PosixPath'>

Total running time of the script: ( 0 minutes 0.001 seconds)

Gallery generated by Sphinx-Gallery