Threads of ASP with Python script code

Stefan Radke Stefan_Radke at compuserve.com
Thu Jan 13 21:01:05 EST 2000


The following ASP gives me trouble:

[HTML]
[some initialisation script code]
[more HTML]
<%
import my_python_module
%>

[more HTML, mixed with script code, creating an instance of class in
my_python_module:]
this = my_python_module.myClass()

The my_python_module has a class defnition. From this class I create an
instance, an read some file names from a disk into a list, the only member
of this class. The list is use dto create an options-list on the page.

The problem now is, that whenever I do a reload of the ASP in IE, the list
gets longer, because the same files are searched in the class-initialisation
again, but the previous instance still exists.

This even does not change, if I add a "del this" at the end. On another
machine the same list can be viewed, although a new session has been
started. To me this means that both ASP sessions use the same memory space
within the python environment :-( ...

Does anyone know how to implement this correctly ?  It would mean to have
seperate memory in each session.

Thank you for any help, Stefan.



More information about the Python-list mailing list