<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
<META content="MSHTML 6.00.2716.2200" name=GENERATOR></HEAD>
<BODY>
<DIV><FONT face=Arial size=2><SPAN class=245173212-03082004>I added this code in
prep():</SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN
class=245173212-03082004></SPAN></FONT> </DIV>
<DIV><FONT face=Arial size=2><SPAN class=245173212-03082004>def
prep(self):</SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN class=245173212-03082004>
.....</SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN class=245173212-03082004> cookies
= self.get_cookies()<BR> COOKIE_NAME =
'backgroundcolor'<BR> if
cookies.has_key(COOKIE_NAME):<BR>
self.body_attrs['BGCOLOR']=cookies[COOKIE_NAME].value</SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN
class=245173212-03082004></SPAN></FONT> </DIV>
<DIV><FONT face=Arial size=2><SPAN class=245173212-03082004>in order to achieve
what I wont I had to modify the servlet.py get_cookies:</SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN class=245173212-03082004>
def get_cookies(self, klass=Cookie.Cookie,
**kw):<BR> ... </SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN class=245173212-03082004></SPAN></FONT><FONT
face=Arial size=2><SPAN class=245173212-03082004> return
Cookie.get_cookies(self.req, klass)<BR> #return
Cookie.get_cookies(self.req, klass, kw) <--- with kw :</SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN
class=245173212-03082004></SPAN></FONT> </DIV>
<DIV><FONT face=Arial size=2><SPAN class=245173212-03082004><!--StartFragment --><FONT face="Times New Roman"
size=3> </FONT> File
"C:\PROGRA~1\Python23\lib\site-packages\mod_python\servlet.py", line 484, in
get_cookies<BR> return Cookie.get_cookies(self.req, klass,
kw)<BR><BR>TypeError: get_cookies() takes at most 2 arguments (3
given)</SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN
class=245173212-03082004></SPAN></FONT> </DIV>
<DIV><FONT face=Arial size=2><SPAN class=245173212-03082004>any
Idea?</SPAN></FONT></DIV>
<P><FONT face=Tahoma color=#0000ff size=1>Villiam Manera</FONT> <BR><FONT
face=Tahoma size=1>Manifatture del Nord srl</FONT> <BR><FONT face=Tahoma
size=1>via Mazzacurati 6</FONT></P>
<P><FONT face=Tahoma size=1>42100 Reggio Emilia RE</FONT> <BR><FONT face=Tahoma
size=1>ITALY</FONT> </P>
<P><FONT face=Tahoma size=1>Tel. +39 0522 358200</FONT> <BR><FONT face=Tahoma
size=1>Fax +39 0522 268700</FONT> <BR><FONT face=Tahoma size=1>email :
vmanera@manord.com</FONT> <BR><FONT face=Tahoma size=1>www.pennyblack.com</FONT>
</P>
<DIV> </DIV></BODY></HTML>