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

What does echo do python?

0 Answers  


What do you mean by ‘suites’ in python?

0 Answers  


What is end in python?

0 Answers  


What is python interpreter?

0 Answers  


What are list comprehensions in Python?

2 Answers  






What is the difference between range & xrange? Explain?

0 Answers  


What is the use of the break statement?

0 Answers  


Which command do you use to exit help window or help command prompt?

0 Answers  


Is python a single inheritance?

0 Answers  


Is python or r more useful?

0 Answers  


Does python do until loop?

0 Answers  


Does python support interfaces like java does?

0 Answers  


Categories