XSLTools

examples/CGI/DictionaryApp.py

590:255a1d93cb51
2007-06-10 paulb [project @ 2007-06-10 19:43:29 by paulb] Commented out PYTHONPATH changes. Refer to installed resources where possible.
     1 #!/usr/bin/env python     2      3 # Initialise paths and the dictionary.     4 # NOTE: Path manipulation requires manual customisation.     5      6 import sys     7 #sys.path.append("/home/paulb/Software/Python/WebStack")     8 #sys.path.append("/home/paulb/Software/Python/XSLTools")     9 #sys.path.append("/home/paulb/Software/Python/XSLTools/examples/Common")    10 #sys.path.append("/home/paulb/Software/Python/libxml2dom")    11 #filename = "/home/paulb/Software/Python/XSLTools/docs/LICENCE.txt"    12 filename = "/usr/share/doc/python2.4-xsltools/docs/LICENCE.txt"    13 encoding = None    14     15 from WebStack.Adapters.CGI import deploy    16 import Dictionary    17 from Dictionary.Dict import Dict    18     19 dict = Dict(filename, encoding)    20     21 # Get a simple Web site.    22     23 resource = Dictionary.get_site(dict)    24     25 # Special magic incantation.    26     27 deploy(resource, handle_errors=0)    28     29 # vim: tabstop=4 expandtab shiftwidth=4