On NT, use a better template, ~XXX- where XXX is os.getpid().

This commit is contained in:
Guido van Rossum 1997-12-15 19:11:53 +00:00
parent 85f8b0980d
commit 80fb344a18
1 changed files with 2 additions and 0 deletions

View File

@ -60,6 +60,8 @@ def gettempprefix():
if template == None: if template == None:
if os.name == 'posix': if os.name == 'posix':
template = '@' + `os.getpid()` + '.' template = '@' + `os.getpid()` + '.'
elif os.name == 'nt':
template = '~' + `os.getpid()` + '-'
elif os.name == 'mac': elif os.name == 'mac':
template = 'Python-Tmp-' template = 'Python-Tmp-'
else: else: