Re: string join() method

2005-03-24 Thread Kent Johnson
Derek Basch wrote: Can anyone tell me why this CGI code outputs a blank page? Maybe because it needs a blank line between the header and the body? self.output = [] self.setContentType("text/plain") ascii_temp.seek(0) self.output.extend(ascii_temp.read()) self.output

Re: string join() method

2005-03-24 Thread Damjan
> but perhaps the webserver sanitizes the output of CGI script and converts > plain "\n" into "\r\n" Yes apache does this, since it adds its own headers anyway it will replace all '\n' in the headers with '\r\n' and '\n\n' with '\r\n\r\n'. -- damjan -- http://mail.python.org/mailman/listinfo/

Re: string join() method

2005-03-23 Thread Benjamin Niemann
Derek Basch wrote: > Can anyone tell me why this CGI code outputs a blank page? > > self.output = [] > self.setContentType("text/plain") > ascii_temp.seek(0) > self.output.extend(ascii_temp.read()) > print ''.join(self.output) > > def setContentType(self, type="te

string join() method

2005-03-23 Thread Derek Basch
Can anyone tell me why this CGI code outputs a blank page? self.output = [] self.setContentType("text/plain") ascii_temp.seek(0) self.output.extend(ascii_temp.read()) print ''.join(self.output) def setContentType(self, type="text/xml"): self.output.extend(["Con