summaryrefslogtreecommitdiffstats
path: root/Tools/faqwiz
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>1997-05-26 06:12:50 (GMT)
committerGuido van Rossum <guido@python.org>1997-05-26 06:12:50 (GMT)
commit2305231acd35218a74cabb2ec6c7e6501575afab (patch)
treebebd51c6475cd842c16525d1a99623b09511ba31 /Tools/faqwiz
parent46a160f6de63cd5d3851a4e225fec1572932e578 (diff)
downloadcpython-2305231acd35218a74cabb2ec6c7e6501575afab.zip
cpython-2305231acd35218a74cabb2ec6c7e6501575afab.tar.gz
cpython-2305231acd35218a74cabb2ec6c7e6501575afab.tar.bz2
Added a local customization feature: load some parameters from faqcust.
Diffstat (limited to 'Tools/faqwiz')
-rw-r--r--Tools/faqwiz/faqconf.py32
1 files changed, 22 insertions, 10 deletions
diff --git a/Tools/faqwiz/faqconf.py b/Tools/faqwiz/faqconf.py
index 2cd4b9e..3af5b5e 100644
--- a/Tools/faqwiz/faqconf.py
+++ b/Tools/faqwiz/faqconf.py
@@ -9,34 +9,46 @@ of parameters below it.
# Titles of FAQ sections
SECTION_TITLES = {
+ # SectionNumber : SectionTitle; need at least one entry
1: "General information and availability",
- 2: "Python in the real world",
- 3: "Building Python and Other Known Bugs",
- 4: "Programming in Python",
- 5: "Extending Python",
- 6: "Python's design",
- 7: "Using Python on non-UNIX platforms",
}
# Parameters you definitely want to change
-PASSWORD = "Spam" # Editing password
-FAQNAME = "Python FAQ" # Name of the FAQ
+SHORTNAME = "Generic" # FAQ name with "FAQ" omitted
+PASSWORD = "" # Password for editing
OWNERNAME = "GvR" # Name for feedback
OWNEREMAIL = "guido@python.org" # Email for feedback
HOMEURL = "http://www.python.org" # Related home page
HOMENAME = "Python home" # Name of related home page
-COOKIE_NAME = "Python-FAQ-Wizard" # Name used for Netscape cookie
RCSBINDIR = "/depot/gnu/plat/bin/" # Directory containing RCS commands
# (must end in a slash)
# Parameters you can normally leave alone
-FAQCGI = 'faqw.py' # Relative URL of the FAQ cgi script
MAXHITS = 10 # Max #hits to be shown directly
COOKIE_LIFETIME = 28*24*3600 # Cookie expiration in seconds
# (28*24*3600 = 28 days = 4 weeks)
+# This parameter is normally overwritten with a dynamic value
+
+FAQCGI = 'faqw.py' # Relative URL of the FAQ cgi script
+import os, sys
+FAQCGI = os.path.basename(sys.argv[0]) or FAQCGI
+del os, sys
+
+# Load local customizations on top of the previous parameters
+
+try:
+ from faqcust import *
+except ImporError:
+ pass
+
+# Calculated parameter names
+
+COOKIE_NAME = SHORTNAME + "-FAQ-Wizard" # Name used for Netscape cookie
+FAQNAME = SHORTNAME + " FAQ" # Name of the FAQ
+
# Regular expression to recognize FAQ entry files: group(1) should be
# the section number, group(2) should be the question number. Both
# should be fixed width so simple-minded sorting yields the right