Describe how to use Sessions for Web python.
Answer / 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 |
What are the principal differences between the lambda and def?
Explain the shortest way to open a text file and display its contents?
What is a namespace in python?
What are the disadvantages of the python?
Explain about the programming language python?
We know python is all the rage these days. But to be truly accepting of a great technology, you must know its pitfalls as well. Would you like to talk about this?
Is r similar to python?
Write a script to connect to MySql database using Python?
What are the modes to open a file in python?
How do you make 3d plots/visualizations using numpy/scipy?
Write a one-liner that will count the number of capital letters in a file. Your code should work even if the file is too big to fit in memory.
How do I run python in notepad ++?