On 7 Αύγ, 22:07, MRAB <pyt...@mrabarnett.plus.com> wrote: > re.search('cyta', host) will return None if there's no match, but you > said "Yes it does contain it", so there _is_ a match, therefore: > > hostmatch is None > > is False.
The code block inside the if structure must be executes ONLY if the 'visitor' cookie is not set to the client's browser or the hostname address of the client doesn't contain in it the string 'cyta'. # ====================================== # do not increment the counter if a Cookie is set to the visitors browser already # ====================================== if cookie.has_key('visitor') != 'nikos' or re.search('cyta', host) is None: I still don't get it :) -- http://mail.python.org/mailman/listinfo/python-list