Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 80fb344

Browse files
committed
On NT, use a better template, ~XXX- where XXX is os.getpid().
1 parent 85f8b09 commit 80fb344

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

Lib/tempfile.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,8 @@ def gettempprefix():
6060
if template == None:
6161
if os.name == 'posix':
6262
template = '@' + `os.getpid()` + '.'
63+
elif os.name == 'nt':
64+
template = '~' + `os.getpid()` + '-'
6365
elif os.name == 'mac':
6466
template = 'Python-Tmp-'
6567
else:

0 commit comments

Comments
 (0)