]> granicus.if.org Git - python/commitdiff
On NT, use a better template, ~XXX- where XXX is os.getpid().
authorGuido van Rossum <guido@python.org>
Mon, 15 Dec 1997 19:11:53 +0000 (19:11 +0000)
committerGuido van Rossum <guido@python.org>
Mon, 15 Dec 1997 19:11:53 +0000 (19:11 +0000)
Lib/tempfile.py

index 652d1963d3d7f07acd7f5cc426a00b199d2cd5bb..d36898b3086de183d529d82e98a32fd9b6d5aa50 100644 (file)
@@ -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: