Sessions directory relative to DOCUMENT_ROOT?

I'd like my sessions directory to be the root of each virtual server.
But the obvious code doesn't work because web.ctx.env isn't available
earlier enough:

    docroot = web.ctx.env.get('DOCUMENT_ROOT', '')
    session = web.session.Session(app, web.session.DiskStore(docroot +
'/sessions'))

Is there another way to get at the document root?
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"web.py" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [email protected]
For more options, visit this group at http://groups.google.com/group/webpy?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to