ID EN
Pathlib

cwd

Python 3.11

Return a new path object representing the current directory (as returned by os.getcwd()):

Syntax

PYTHON
classmethod Path.cwd()

Examples

Example 1
PYTHON
>>> Path.cwd()
PosixPath('/home/antoine/pathlib')

See Also

os.getcwd()