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.



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

Post New Answer

More Python Interview Questions

Explain the use of decorators?

0 Answers  


How many coding styles are there in python?

0 Answers  


Can we use else block with for loop? Answer with one example.

0 Answers  


What is a raw input?

0 Answers  


I am from non technical Background. In how many days I can learn the python? and What I need to do for that?

0 Answers  


How can files be deleted in python?

0 Answers  


How does Python’s list.sort work at a high level? Is it stable? What’s the runtime?

0 Answers  


What is different between class and object?

0 Answers  


What is the optional statement used in a try except statement in Python?

0 Answers  


Why is that none of my threads are not running? How can I make it work?

0 Answers  


Does python have private methods?

0 Answers  


What are the built-in types available in python?

0 Answers  


Categories