can't import module in ASP

nonamehkg at hotmail.com nonamehkg at hotmail.com
Wed Jan 11 22:53:22 EST 2006


Hi all, I have found that I can't import modules in ASP (python) and
those modules are in the same directory. I can surely do that with a
.py file but not in ASP.

I have noticed the currently working directory when python used in ASP
is somewhere else rather than where the asp file is.

I remember I tried to set PYTHONPATH env variable to the directory
where asp files are, and it works. And whenever I changed my modules I
had to restart the IIS service otherwise it used the old ones.

Now, that is so inconvenient as I have to set path and restart IIS
whenever I update my modules.

I am asking if there are somethings I could do about that?
Could someones help me about that?

sample asp code:

<%
import example  # <-- error, but example.py is in the same folder
%>

Thanks,
=======
kychan




More information about the Python-list mailing list