HTMLgen error

Discussion in 'Python' started by Armand Federico - INFO, Nov 23, 2004.

  1. I received an error when i try htmlgen on winxp, apapche, mysql, mod_python


    THIS IS THE ERROR

    Mod_python error: "PythonHandler mod_python.publisher"
    Traceback (most recent call last):
    File "C:\PROGRA~1\PYTHON~1\lib\site-packages\mod_python\apache.py", line
    193, in Dispatch
    result = object(req)
    File "C:\PROGRA~1\PYTHON~1\lib\site-packages\mod_python\publisher.py", line
    171, in handler
    result = apply(object, (), args)
    File "c:/programmi/apache/pub\test-pub.py", line 10, in pippo
    doc = HTMLgen.BasicDocument(title=title)

    NameError: global name 'HTMLgen' is not defined


    THIS IS THE CODE

    """ Publisher example """

    import HTMLgen
    def pippo(req) :
    title = "try title"
    doc = HTMLgen.BasicDocument(title=title)
    doc.append(HTMLgen.Center(HTMLgen.Heading(1, title)))
    doc.append(HTMLgen.Paragraph(
    """(Try paragraph, Try paragraph, Try paragraph, Try paragraph,
    Try paragraph, Try paragraph, Try paragraph, Try paragraph, Try paragraph,
    Try paragraph, Try paragraph, Try paragraph, Try paragraph, Try paragraph,
    Try paragraph, Try paragraph, Try paragraph, Try paragraph, Try
    paragraph.)"""))

    return doc
     
    Armand Federico - INFO, Nov 23, 2004
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. HTMLgen docs, tutorial

    , Oct 1, 2003, in forum: Python
    Replies:
    4
    Views:
    832
    John Dean
    Oct 3, 2003
  2. dont bother

    Where to put the HTMLgen files

    dont bother, Apr 30, 2004, in forum: Python
    Replies:
    1
    Views:
    402
    Peter Otten
    Apr 30, 2004
  3. Andre van der Vlies

    Diffs for HTMLgen

    Andre van der Vlies, Sep 1, 2004, in forum: Python
    Replies:
    1
    Views:
    365
    Tim Roberts
    Sep 3, 2004
  4. adeger
    Replies:
    2
    Views:
    322
    Duncan Booth
    Sep 22, 2004
  5. C. Titus Brown

    HTMLgen maintenance.

    C. Titus Brown, Feb 23, 2005, in forum: Python
    Replies:
    0
    Views:
    310
    C. Titus Brown
    Feb 23, 2005
Loading...

Share This Page