Skip to content

Commit 7d09891

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 d80f581 commit 7d09891

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
@@ -2150,6 +2150,11 @@ features:
21502150

21512151
.. audit-event:: os.chdir path os.chdir
21522152

2153+
.. seealso::
2154+
2155+
The :func:`contextlib.chdir` context manager, which changes the current
2156+
working directory on entering and restores the previous one on exit.
2157+
21532158
.. versionchanged:: 3.3
21542159
Added support for specifying *path* as a file descriptor
21552160
on some platforms.

0 commit comments

Comments
 (0)