Answer Posted / chaitanya
Sessions are the server side version of cookies. While a cookie preserves state at the client side, sessions preserves state at server side.
The session state is kept in a file or in a database at the server side. Each session is identified by a unique session id (SID). To make it possible to the client to identify himself to the server the SID must be created by the server and sent to the client whenever the client makes a request.
Session handling is done through the web.session module in the following manner:
import web.session session = web.session.start( option1, Option2,... )
session['myVariable'] = 'It can be requested'
| Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
What is automation in python?
What will be the output of ['!!welcome!!']*2?
How do you find the number of references pointing to a particular object?
Can python function return multiple values?
Why python is so popular with developers?
How many name spaces are defined in python?
How to convert bytes to a string?
Explain how to redirect the output of a python script from standout(ie., A monitor) on to a file?
Which is best python or r?
What is the result of pow(x,y)?
How do you find the type and identification number of an object in python?
Which is faster python or c?
If a function does not have a return statement, is it valid?
What are the disadvantages of the python?
What is pythonpath?