summaryrefslogtreecommitdiffstats
path: root/Lib/tempfile.py
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>1997-12-15 19:11:53 (GMT)
committerGuido van Rossum <guido@python.org>1997-12-15 19:11:53 (GMT)
commit80fb344a188fd201144a47a0d41a62fb97ff01ec (patch)
tree0ec67766383aa5de5fe7166b97d7ad5a1dd90925 /Lib/tempfile.py
parent85f8b0980d6a518eb1bf0b05eb772e2616129337 (diff)
downloadcpython-80fb344a188fd201144a47a0d41a62fb97ff01ec.zip
cpython-80fb344a188fd201144a47a0d41a62fb97ff01ec.tar.gz
cpython-80fb344a188fd201144a47a0d41a62fb97ff01ec.tar.bz2
On NT, use a better template, ~XXX- where XXX is os.getpid().
Diffstat (limited to 'Lib/tempfile.py')
-rw-r--r--Lib/tempfile.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/Lib/tempfile.py b/Lib/tempfile.py
index 652d196..d36898b 100644
--- a/Lib/tempfile.py
+++ b/Lib/tempfile.py
@@ -60,6 +60,8 @@ def gettempprefix():
if template == None:
if os.name == 'posix':
template = '@' + `os.getpid()` + '.'
+ elif os.name == 'nt':
+ template = '~' + `os.getpid()` + '-'
elif os.name == 'mac':
template = 'Python-Tmp-'
else: