Trouble storing object in session variable (ActivePython/IIS)

Robin Edgar Hansen robin.hansen at codito.ch
Sun Nov 9 17:42:01 CET 2003


Hi!

I'd like to store an object in a session variable and thus keep it
'alive' for the entire session. More precisely I wanted to do this
(possibly in Application_OnStart()):

	import telnetlib
	cli = telnetlib.Telnet("localhost",9999)
	Session.SetValue("cli",cli)

BUT, it seems only simple variables can be stored as session
variables. Have I missed something (being new to the Python/ASP
combo)? Comments would be much appreciated. Forgive me for bringing up
a subject already discussed, but my searching thus far has been to no
avail. Perhaps someone can offer an alternative solution?  I should
say, that using Apache is unfortunately not an option at this time;
however I do aim to keep my options open.

Thank you
-Robin




More information about the Python-list mailing list