Describe how to implement Cookies for Web python.



Describe how to implement Cookies for Web python...

Answer / 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

More Python Interview Questions

With python, how do you find out which directory you are currently in?

0 Answers  


please give the code for these 1 2 4 7 11 16...

1 Answers  


Are pandas distributed?

0 Answers  


Do you know how is memory managed in python?

0 Answers  


What type of language is python? Programming or scripting?

0 Answers  






What is the use of map in python?

0 Answers  


What is dogpile effect?

0 Answers  


How do you use return in python?

0 Answers  


Does Python support strongly for regular expressions? What are the other languages that support strongly for regular expressions?

0 Answers  


What is Python Decorator?

0 Answers  


What are local variables and global variables in python?

0 Answers  


Why is not__getattr__invoked when attr==’__str__’?

0 Answers  


Categories