]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Use tempfile.gettempdir() to get the temp directory rather than
authorGuido van Rossum <guido@python.org>
Thu, 17 Oct 2002 16:26:45 +0000 (16:26 +0000)
committerGuido van Rossum <guido@python.org>
Thu, 17 Oct 2002 16:26:45 +0000 (16:26 +0000)
hardcoding "/tmp".

Demo/cgi/wiki.py

index f0208a416b3e4bb1ddeabc88ff4faa8fe0df7fde..58dc51fd2272ff529b67cda78d20c3caf02f0126 100644 (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):