Cookies

Anders M Eriksson anders.eriksson at morateknikutveckling.se
Thu Jan 13 09:56:25 EST 2000


Hello!

I have downloaded the Cookie.py module by Mr Timothy O'Malley, but I
can't figure out how to use it:-(

if I have this script 

# ---------------------------------------
import Cookie

kaka = Cookie.Cookie()
try:
	nPos = kaka['nPos'].value
except:
	nPos = 0

for i in range(20)
	npos = npos + 1
print "Content-type: text/html\n"
print `nPos`

kaka['nPos'] = nPos

# ----------------------------------------------

Why doesn't this script increase the value of nPos with 20 each time I
run it? (well I know that it's because the cookie isn't saved, but
why)

// Anders

---
Enlish isn't my first or second language, 
so anything that you find offending is not there on 
purpose it's just due to the translation ;-)



More information about the Python-list mailing list