🔵 🔵 🔵


Primary

၊၊||၊|။

os.chdir() ⚬|Documentation|1st|20251021183614-00-⌔

os — Miscellaneous operating system interfaces — Python 3 documentation#os.chdir

os.chdir(path)

Change the current working directory to path.

This function can support specifying a file descriptor. The descriptor must refer to an opened directory, not an open file.

This function can raise OSError and subclasses such as FileNotFoundError, PermissionError, and NotADirectoryError.

Raises an auditing event os.chdir with argument path.

Changed in version 3.3: Added support for specifying path as a file descriptor on some platforms.

Changed in version 3.6: Accepts a path-like object.

Printed 2026-06-28.

(echo:: @ )

Link to original

Secondary

• • •