[Tutor] FW: HTMLgen question

David Carter dactex at swbell.net
Fri Sep 3 19:49:46 CEST 2004

Hello All;

I decided to try out the HTMLgen module today.
First of all, let me preface by saying that my HTMLgen install is kludged
together, since I have no "make" for Windows, and I had to sort of build it
manually by reading the Readme and trying to grok the makefile.txt as best I

I'm running Python 2.3.2 under Win2K Server with IIS as an ASP-type page. So
I just tried the simplest thing I could think of:

*******BEGIN CODE*****************
import HTMLgen
a = HTMLgen.BasicDocument()
*******END CODE*******************

Browsing to the page returns:
*******BEGIN RESPONSE*****************
Python ActiveX Scripting Engine error '80020009' 
Traceback (most recent call last): File "<Script Block >", line 3, in ?
Response.Write(a) File "<COMObject Response>", line 2, in Write TypeError:
Objects for SAFEARRAYS must be sequences (of sequences), or a buffer object.

/pyfile.asp, line 4
*******END RESPONSE*******************

If I run this in IDLE, replacing the "Response.Write(a)" with "print a", I
get a nice, complete HTML document, which I can view in my Browser. Anybody
know what's up with this? 

David Carter

More information about the Tutor mailing list