I have a question:len(self.application().sessions().keys()
How to know, how many sessions is currently open and furtherly how to know, how many window of browsers currently access the same page.
as in
self.writeln('There Are currently %s active sessions' % len(self.application().sessions().keys()))
for sess in self.application().sessions().keys():
self.writeln('<br><br>Session Key: %s' % sess)
thisSession = self.application().session(sess)
self.writeln('<br>Active Since: %s' % strftime("%a, %d %b %Y %H:%M:%S %Z", gmtime(thisSession.creationTime())))
self.writeln('<br>Last Access: %s' % strftime("%a, %d %b %Y %H:%M:%S %Z", gmtime(thisSession.lastAccessTime())))
#self.writeln(thisSession.values().keys())
self.writeln('<table>')
#dump custom session vars
if thisSession.hasValue('user'):
self.writeDataRow('UserName','<b>' + str(thisSession.value('user')) + '</b>')
if thisSession.hasValue('CurrentSQL'):
self.writeDataRow('Current SQL Statement',thisSession.value('CurrentSQL').genSQL())
if thisSession.hasValue('rsSize'):
self.writeDataRow('Current Result Set Size',str(thisSession.value('rsSize')) + ' Records')
self.writeln('</table>')
-Aaron Held
-------------------------------------------------------
This SF.net email is sponsored by: SF.net Giveback Program.
Does SourceForge.net help you be more productive? Does it
help you create better code? SHARE THE LOVE, and help us help
YOU! Click Here: http://sourceforge.net/donate/
_______________________________________________
Webware-discuss mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/webware-discuss
------------------------------------------------------- This SF.net email is sponsored by OSDN's Audience Survey. Help shape OSDN's sites and tell us what you think. Take this five minute survey and you could win a $250 Gift Certificate. http://www.wrgsurveys.com/2003/osdntech03.php?site=8 _______________________________________________ Webware-discuss mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/webware-discuss
