Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

Describe how to use Sessions for Web python.

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


Please Help Members By Posting Answers For Below Questions

Is there a switch or case statements in python?if not what is the reason for the same?

769


Explain about multi-threading concept in python?

866


Can python be used for automation?

850


What does while true do in python?

841


Which module(s) of python can be used to measure the performance of your application code?

849


How to create an empty class in python?

863


Is python faster than matlab?

829


How do you get the last value in a list or a tuple?

824


What is instance of a class?

947


What does the list comprehension do?

877


What is the dictionary?

846


Explain python list comprehension?

817


What are the features of python?

949


What are the programming-language features of python?

885


How are arguments passed by value or by reference?

832