How to implement Cookies for Web python?

Describe how to implement Cookies for Web python.

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 )
How to use Sessions for Web python?
Sessions are the server side version of cookies. While a cookie preserves state at the client side, sessions preserves state at server side........
How exceptions are handled in python?
How exceptions are handled in python? - Errors detected during execution of program are called exceptions. Exceptions can be handled using the try..except statement.......
What is used to create Unicode string in Python?
Unicode is a system to represent characters from all the world's different languages.......
Post your comment