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
How to reverse a string in python
Where do you use python programming? Can you describe in detail?
What is constructor in python?
What is a class method?
Understanding python super() with __init__() methods?
What is decorator in python?
what's wrong with import all?
Are functions objects in python?
How many types of objects does python support?
Who uses python?
What do you understand by mutable and immutable in python?
How fast can you learn python?
Explain me what is unittest in python?
What is the length of your largest python code? Can you please describe the project?
How are data types defined in python and how much bytes do integer and decimal data types hold?