Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 13 additions & 2 deletions Doc/library/tempfile.rst
Original file line number Diff line number Diff line change
Expand Up @@ -348,8 +348,14 @@ The module defines the following user-callable items:

#. A platform-specific location:

* On Windows, the directories :file:`C:\\TEMP`, :file:`C:\\TMP`,
:file:`\\TEMP`, and :file:`\\TMP`, in that order.
* On Windows, the following directories, in that order:

- :file:`%USERPROFILE%\\AppData\\Local\\Temp`
- :file:`%SYSTEMROOT%\\Temp`
- :file:`C:\\TEMP`
- :file:`C:\\TMP`
- :file:`\\TEMP`
- :file:`\\TMP`

* On all other platforms, the directories :file:`/tmp`, :file:`/var/tmp`, and
:file:`/usr/tmp`, in that order.
Expand All @@ -359,6 +365,11 @@ The module defines the following user-callable items:
The result of this search is cached, see the description of
:data:`tempdir` below.

.. versionchanged:: 3.6
On Windows, :file:`%USERPROFILE%\\AppData\\Local\\Temp` and
:file:`%SYSTEMROOT%\\Temp` are now checked before the hardcoded
directory paths.

.. versionchanged:: 3.10

Always returns a str. Previously it would return any :data:`tempdir`
Expand Down
Loading