[Tutor] counter
kirk Bailey
idiot1@netzero.net
Sat, 09 Feb 2002 23:39:35 -0500
Would this be a useless python event, or is it too useful? It is toing
the counting on the tinylist site NOW.
Danny Yoo wrote:
>
> > Thankyou, here is the result.
> >
> >
> > ns# list counter.py
> > Listing of file counter.py in directory:/www/www.tinylist.org/cgi-bin
> >
> > #!/usr/local/bin/python
> > #
> > #
> > f1=open("count",'r')
> > count=int(f1.readline())
> > f1.close()
> > count=count+1
> > result=str(count)
> > print result,
> > f1=open("count",'w')
> > f1.write(result+"\r\n")
> > f1.close
>
> Very cool. *grin*
--
end
Respectfully,
Kirk D Bailey
+---------------------"Thou Art Free." -Eris----------------------+
| http://www.howlermonkey.net mailto:highprimate@howlermonkey.net |
| http://www.tinylist.org +--------+ mailto:grumpy@tinylist.org |
+------------------Thinking| NORMAL |Thinking---------------------+
+--------+
----------------------------------------------------
Sign Up for NetZero Platinum Today
Only $9.95 per month!
http://my.netzero.net/s/signup?r=platinum&refcd=PT97