diff options
author | Guido van Rossum <guido@python.org> | 2002-10-17 16:26:45 +0000 |
---|---|---|
committer | Guido van Rossum <guido@python.org> | 2002-10-17 16:26:45 +0000 |
commit | 91e6cc636e05499f7a5da83046efac0c1d0f42df (patch) | |
tree | 82a0644d812657ccbb5235a3cd5b58c82ed29e7e /Demo/cgi | |
parent | a0cb6128568c1a5b316a56ce43428a41202eabd4 (diff) | |
download | cpython-91e6cc636e05499f7a5da83046efac0c1d0f42df.tar.gz |
Use tempfile.gettempdir() to get the temp directory rather than
hardcoding "/tmp".
Diffstat (limited to 'Demo/cgi')
-rw-r--r-- | Demo/cgi/wiki.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Demo/cgi/wiki.py b/Demo/cgi/wiki.py index f0208a416b..58dc51fd22 100644 --- a/Demo/cgi/wiki.py +++ b/Demo/cgi/wiki.py @@ -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): |