Describe how to implement Cookies for Web python.

Answer Posted / chaitanya

A cookie is an arbitrary string of characters that uniquely identify a session.

Each cookie is specific to one Web site and one user.

The Cookie module defines classes for abstracting the concept of cookies. It contains following method to creates cookie

Cookie.SimpleCookie([input])

Cookie.SerialCookie([input]

Cookie.SmartCookie([input])

for instance following code creates a new cookie ck-

import Cookie

ck= Cookie.SimpleCookie ( x )

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the process of pickling and unpicling?

482


What is the difference between python append () and extend () functions?

496


How for loop will works in python?

464


How to pass indefinite number of arguments to any function?

457


What is a list in python?

460






What are class or static variables in python programming?

481


What is the best ide for python?

452


How do I start learning python?

473


How many items are in a list python?

435


What are the difference between python and java?

481


What does exit () do in python?

454


How do you create a database in python?

438


Why lambda forms in python does not have statements?

555


What does static pressure mean?

428


What is python tuples and how is it different from lists?

480