can't import module in ASP

N

nonamehkg

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,276
Messages
2,571,384
Members
48,073
Latest member
ImogenePal

Latest Threads

Top