summaryrefslogtreecommitdiffstats
path: root/Demo/cgi
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>2002-10-17 16:26:45 (GMT)
committerGuido van Rossum <guido@python.org>2002-10-17 16:26:45 (GMT)
commitc9776bd8ddeeace9f48274aa49674a7be3b4fa85 (patch)
treedfa465ecbbf3c7f603f469d1b02aaf80e481162f /Demo/cgi
parentb39031587246c0c2dfc21271c1bbfb37dbfc748f (diff)
downloadcpython-c9776bd8ddeeace9f48274aa49674a7be3b4fa85.zip
cpython-c9776bd8ddeeace9f48274aa49674a7be3b4fa85.tar.gz
cpython-c9776bd8ddeeace9f48274aa49674a7be3b4fa85.tar.bz2
Use tempfile.gettempdir() to get the temp directory rather than
hardcoding "/tmp".
Diffstat (limited to 'Demo/cgi')
-rw-r--r--Demo/cgi/wiki.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/Demo/cgi/wiki.py b/Demo/cgi/wiki.py
index f0208a4..58dc51f 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):