Import-error using own modules in Python in ASP

Opinderjit bhellao at my-deja.com
Mon Oct 16 11:02:57 EDT 2000


The module has to be on the PYTHONPATH of the Python Interrupter called
by IIS. If this is not the case, perhaps you have a TAB instead of a
space somewhere in or around the import. This gave me lots of grief.
Try deleting the import and retyping it.

I have successfully imported my own modules from ASP. So it can be done.

In article <39eaf017.4386547 at news.eunet.no>,
  thomas at cintra.no (Thomas Weholt) wrote:
> Hi,
>
> I'm trying to ditch VBScript in favour of Python in ASP, but I keep
> getting an import error when I try to import my own modules. It works
> fine in Pythonwin, but fails terribly in ASP.
>
> In my Python-folder I've created a folder called hs, with an empty
> __init__.py file in it. In the asp-page I'm trying to import it doing
> stuff like :
>
> from hs.db import *
>
> And it fails, saying there's no module named db. The file db.py exists
> in the hs-folder.
>
> Any tips or hints?
>
> Thomas
>


Sent via Deja.com http://www.deja.com/
Before you buy.



More information about the Python-list mailing list