no, sessions are Storage() objects. You need to unpickle them, change whatever you need to change and pickle them back before saving.
On Friday, September 14, 2012 9:18:01 PM UTC+2, monotasker wrote: > > Ok, so would I then just have python read the contents of the file and > then unpickle the whole as a single string? > > Ian > > On Friday, September 14, 2012 2:52:33 PM UTC-4, Niphlod wrote: >> >> it's not hashed, it's pickled. >> >> On Friday, September 14, 2012 7:40:47 PM UTC+2, monotasker wrote: >>> >>> Following on an earlier question of mine, I'm trying to arrange for >>> persistent data (per user) by writing session data to the db. The trick I'm >>> stumbling over is how to make sure that the session data that is stored >>> always represents the end of the most recent user session. It seems to me >>> like the best solution would be to set up a cron job to (a) check for >>> session files that haven't been changed recently; and (b) write their data >>> to the db. >>> >>> Looking at the contents of a session file, though, I'm not sure how to >>> read data from them. Is there a gluon class that I can call from the cron >>> script? Am I going to run into problems with decrypting hashed data? >>> >>> Thanks, >>> >>> Ian >>> >> --

