Skip to content

Commit 9e0c6e5

Browse files
cmaloneyStanFromIreland
authored andcommitted
Docs: Link to the contextlib.chdir context manager in the os.chdir docs (GH-153152)
(cherry picked from commit f155dbe) Co-authored-by: Cody Maloney <cmaloney@users.noreply.github.com> Co-authored-by: Stan Ulbrych <stan@python.org>
1 parent 7b178f6 commit 9e0c6e5

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
@@ -2078,6 +2078,11 @@ features:
20782078

20792079
.. audit-event:: os.chdir path os.chdir
20802080

2081+
.. seealso::
2082+
2083+
The :func:`contextlib.chdir` context manager, which changes the current
2084+
working directory on entering and restores the previous one on exit.
2085+
20812086
.. versionchanged:: 3.3
20822087
Added support for specifying *path* as a file descriptor
20832088
on some platforms.

0 commit comments

Comments
 (0)