Hello fellow Python Coders! I don't see the error in my attempt to set a a cookie in this test script. Can you help please?! Thank you!
[code] #!/usr/bin/python # -*- coding: utf-8 -*- import Cookie print ( "Content-type: text/html\n" ) cookie = Cookie.SimpleCookie() if cookie.has_key('visitor') == "nikos" #if visitor cookie exist print ( "Δεν σε ειδα, δεν σε ξερω, δεν σε ακουσα. Θα εισαι ο αοραστος επισκεπτης!!" ) cookie['visitor'] = ( 'nikos', time() - 1 ) #this cookie will expire now else print ( "Απο δω και στο εξης δεν θα αυξανω τον μετρητη δικη σου επισκεψη!!" ) cookie['visitor'] = ( 'nikos', time() + 60*60*24*365 ) #this cookie will expire in an year [/code] -- http://mail.python.org/mailman/listinfo/python-list