Webform python cgi issue

tefol tefol at This.Is.Not.An.Address
Sun Oct 7 16:10:48 CEST 2001

tefol at This.Is.Not.An.Address (tefol) wrote in
<9133E264AtefolThisIsNotAnAddr at>: 

>Hiya everyone....

<snipped pickled form>

>What the heck is all that stuff?   

I figured out what all that stuff was now.  That is what pickling does to s 
a form.

So instead of pickling what I am returning,  I have altered the 
FeedbackData thus:

class FeedbackData(FormData):
    fieldnames = ('field1', 'field2', 'field3', 'field4', 'field5')
    def __repr__(self):
        return 'Field1 = %(field1)s \nField2 = %(field2)s \nField3 = 
%(field3)s \nField4 = %(field4)s' % vars(self)

This works great, proved when I exit the script like this:

data = FeedbackData(form)

print "Content-type: text/html\n\n"
print "<h3><center>You did it!</center></H3>"
print data

I get exactly what I want displayed in my browser.  Only thing is when I 

output = open('/home/nemir/output/output.txt', 'w')

I get this in my apache error log:

malformed header from script. Bad header=  File "/home/nemir/public_htm: 

What is the "/home/nemir/public_htm: "???    the directory is public_html!  
not htm....  And where does that colon come from?  Is this something I 
should post on the apache ng?

again,  TIA


More information about the Python-list mailing list