Newbie has question that's not exactly Python...

David Bolen db3l at fitlinxx.com
Wed Apr 4 19:38:43 EDT 2001


"Chris Gonnerman" <chris.gonnerman at usa.net> writes:

> Andrew was right on the money regarding the print statement
> and the extra \n it adds.  I generally do it like this,
> though, *depending* on that extra newline.  On my Apache
> server under Python 1.5.2, this works great.  I didn't need
> the \r's either.

Just FYI, but including CR ('\r') would be technically more accurate,
as HTTP (and the majority of text based IETF network protocols) define
CRLF as the official line terminator (except for individual entity
blocks which can have locally defined terminators).

But most client implementations will be written to just look for the
LF ('\n') and strip any trailing CR or LF.

--
-- David
-- 
/-----------------------------------------------------------------------\
 \               David Bolen            \   E-mail: db3l at fitlinxx.com  /
  |             FitLinxx, Inc.            \  Phone: (203) 708-5192    |
 /  860 Canal Street, Stamford, CT  06902   \  Fax: (203) 316-5150     \
\-----------------------------------------------------------------------/



More information about the Python-list mailing list