Skip to content

Commit f155dbe

Browse files
Docs: Link to the contextlib.chdir context manager in the os.chdir docs (#153152)
Co-authored-by: Stan Ulbrych <stan@python.org>
1 parent 2d7a74e commit f155dbe

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

Doc/library/os.rst

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2180,6 +2180,11 @@ features:
21802180

21812181
.. audit-event:: os.chdir path os.chdir
21822182

2183+
.. seealso::
2184+
2185+
The :func:`contextlib.chdir` context manager, which changes the current
2186+
working directory on entering and restores the previous one on exit.
2187+
21832188
.. versionchanged:: 3.3
21842189
Added support for specifying *path* as a file descriptor
21852190
on some platforms.

0 commit comments

Comments
 (0)