Using python in CGI

Armin cpl.19.ghum at spamgourmet.com
Sun Feb 23 15:38:00 CET 2003


Heho,

> open file
> while not at eof
>      read first line
>      if firstchar on line is not "#"
>           print line
>      else
>           go onto next line
a=open(file,"r")
for i in a:
    	if i[1] <> '#':
    	    	print i

a.close()


.. may also be

 if i[0] <> 

... whatever the "firstchar" means to you





More information about the Python-list mailing list