I have a datetime.date variable in python.I need to pass it to a function do operations according to the date given and then increment the date for the next set of operations.The problem is I have to do the operations in diff pages and hence I need the date as a variable which can go from page to page. Can we do this in python....... This is to be done in .py scripts and not any web related work........
+4
A:
Sessions have nothing to do with Python per se. See your web framework's documentation for how it handles sessions.
Ignacio Vazquez-Abrams
2010-05-08 14:37:34
+1
A:
You could build a global dict of "sessions" and update that dict when appropriate.
extraneon
2010-05-08 14:51:56
A:
If you are interested in a custom session solution, you may want to check out this module used in a web-enabled Bible Verse quizzing program.
Noctis Skytower
2010-05-08 14:52:14
+1
A:
Python itself does not handle sessions. Sessions are a concept that is handled by the web server. For example Apache can handle sessions. Python can access the sessions variables with mod_python, mod_wsgi, or through cgi. Furthermore, web frameworks built on top of these technologies (ex: Django) can access session variables.
tdedecko
2010-05-08 15:12:40