[Python-checkins] python/dist/src/Demo/cgi wiki.py,1.1,1.2
gvanrossum@users.sourceforge.net
gvanrossum@users.sourceforge.net
Thu, 17 Oct 2002 09:26:47 -0700
Update of /cvsroot/python/python/dist/src/Demo/cgi
In directory usw-pr-cvs1:/tmp/cvs-serv29166
Modified Files:
wiki.py
Log Message:
Use tempfile.gettempdir() to get the temp directory rather than
hardcoding "/tmp".
Index: wiki.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Demo/cgi/wiki.py,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** wiki.py 17 Oct 2002 15:53:02 -0000 1.1
--- wiki.py 17 Oct 2002 16:26:45 -0000 1.2
***************
*** 1,5 ****
"""Wiki main program. Imported and run by cgi3.py."""
! import os, re, cgi, sys
escape = cgi.escape
--- 1,5 ----
"""Wiki main program. Imported and run by cgi3.py."""
! import os, re, cgi, sys, tempfile
escape = cgi.escape
***************
*** 17,21 ****
class WikiPage:
! homedir = "/tmp"
scripturl = os.path.basename(sys.argv[0])
--- 17,21 ----
class WikiPage:
! homedir = tempfile.gettempdir()
scripturl = os.path.basename(sys.argv[0])