Zope Python Script Remove all session variables

Using the delete function on the session object, you can remove individual variables within the session scope. This is often more desirable than simply assigning a value of None to the variable.

If you assign None, the variable will still exist as an object in your Zope instance's Transient Object Container (where session variables are stored).
for key in session.keys():
	session.delete(key)
Posted by
Snippet Viewed 2986 times.

Share your Zope Python Script code snippets:

  • Get some recognition & link back to your site.

 

Submit | Browse

Most Recent zope python snippets

Most Viewed