Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Python > HTMLgen error

Reply
Thread Tools

HTMLgen error

 
 
Armand Federico - INFO
Guest
Posts: n/a
 
      11-23-2004
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


 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
HTMLgen maintenance. C. Titus Brown Python 0 02-23-2005 12:16 AM
Add other class attributes to HTMLgen tags? adeger Python 2 09-22-2004 07:27 AM
Diffs for HTMLgen Andre van der Vlies Python 1 09-03-2004 06:29 AM
Where to put the HTMLgen files dont bother Python 1 04-30-2004 11:42 AM
HTMLgen docs, tutorial user@domain.invalid Python 4 10-03-2003 04:52 PM



Advertisments