Use tempfile.gettempdir() to get the temp directory rather than

hardcoding "/tmp".
This commit is contained in:
Guido van Rossum 2002-10-17 16:26:45 +00:00
parent b390315872
commit c9776bd8dd
1 changed files with 2 additions and 2 deletions

View File

@ -1,6 +1,6 @@
"""Wiki main program. Imported and run by cgi3.py."""
import os, re, cgi, sys
import os, re, cgi, sys, tempfile
escape = cgi.escape
def main():
@ -16,7 +16,7 @@ def main():
class WikiPage:
homedir = "/tmp"
homedir = tempfile.gettempdir()
scripturl = os.path.basename(sys.argv[0])
def __init__(self, name):