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. Advertisements

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:
    995
    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:
    494
    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:
    492
    Tim Roberts
    Sep 3, 2004
  4. adeger
    Replies:
    2
    Views:
    435
    Duncan Booth
    Sep 22, 2004
  5. C. Titus Brown

    HTMLgen maintenance.

    C. Titus Brown, Feb 23, 2005, in forum: Python
    Replies:
    0
    Views:
    424
    C. Titus Brown
    Feb 23, 2005
  6. Sebastian Bassi

    Question about HTMLgen

    Sebastian Bassi, Jun 20, 2005, in forum: Python
    Replies:
    0
    Views:
    371
    Sebastian Bassi
    Jun 20, 2005
  7. Cappy2112

    HTMLGen- Table Align property

    Cappy2112, Dec 28, 2005, in forum: Python
    Replies:
    5
    Views:
    477
    Tim Roberts
    Dec 30, 2005
  8. Replies:
    4
    Views:
    430
    Gabriel Genellina
    Dec 19, 2006
Loading...