diff options
author | Guido van Rossum <guido@python.org> | 1997-08-28 02:38:01 (GMT) |
---|---|---|
committer | Guido van Rossum <guido@python.org> | 1997-08-28 02:38:01 (GMT) |
commit | f1ead1a63c879906df346959816337213a11715b (patch) | |
tree | d26833f271a6a10e2b6ade41c606090163b10f9c /Tools/faqwiz/faqwiz.py | |
parent | 8a2d216047c475e59f338fff17142b12eab3164c (diff) | |
download | cpython-f1ead1a63c879906df346959816337213a11715b.zip cpython-f1ead1a63c879906df346959816337213a11715b.tar.gz cpython-f1ead1a63c879906df346959816337213a11715b.tar.bz2 |
New installation instructions show how to maintain multiple FAQs.
Removed bootstrap script from end of faqwiz.py module.
Added instructions to bootstrap script, too.
Version bumped to 0.8.
Added <html>...</html> feature suggested by Skip Montanaro.
Added leading text for Roulette, default to 'Hit Reload ...'.
Fix typo in default SRCDIR.
Diffstat (limited to 'Tools/faqwiz/faqwiz.py')
-rw-r--r-- | Tools/faqwiz/faqwiz.py | 32 |
1 files changed, 15 insertions, 17 deletions
diff --git a/Tools/faqwiz/faqwiz.py b/Tools/faqwiz/faqwiz.py index d380670..5ceb2f9 100644 --- a/Tools/faqwiz/faqwiz.py +++ b/Tools/faqwiz/faqwiz.py @@ -7,8 +7,7 @@ program to maintain some other FAQ than the Python FAQ is contained in the configuration module, faqconf.py. Note that this is not an executable script; it's an importable module. -The actual script in cgi-bin minimal; it's appended at the end of this -file as a string literal. +The actual script to place in cgi-bin is faqw.py. """ @@ -263,7 +262,20 @@ class FaqEntry: self.emit_marks() emit(ENTRY_HEADER2, self) pre = 0 + raw = 0 for line in string.split(self.body, '\n'): + # Allow the user to insert raw html into a FAQ answer + # (Skip Montanaro, with changes by Guido) + tag = string.lower(string.rstrip(line)) + if tag == '<html>': + raw = 1 + continue + if tag == '</html>': + raw = 0 + continue + if raw: + print line + continue if not string.strip(line): if pre: print '</PRE>' @@ -578,6 +590,7 @@ class FaqWizard: return file = whrandom.choice(files) self.prologue(T_ROULETTE) + emit(ROULETTE) self.dir.show(file) def do_help(self): @@ -818,18 +831,3 @@ class FaqWizard: wiz = FaqWizard() wiz.go() - -# This bootstrap script should be placed in your cgi-bin directory. -# You only need to edit the first two lines: change -# /usr/local/bin/python to where your Python interpreter lives change -# the value for FAQDIR to where your FAQ lives. The faqwiz.py and -# faqconf.py files should live there, too. - -BOOTSTRAP = """\ -#! /usr/local/bin/python -FAQDIR = "/usr/people/guido/python/FAQ" -import sys, os -os.chdir(FAQDIR) -sys.path.insert(0, FAQDIR) -import faqwiz -""" |