Calling python from asp

Ulrich Petri ulope at gmx.de
Fri Jul 18 21:31:24 EDT 2003


"BDM" <viffer750 at hotmail.com> schrieb im Newsbeitrag
news:3f17dc2c at cpns1.saic.com...
> Greetings,
> I'm having a difficult time calling a python module from within ASP.  I
have
> narrowed the problem down the very beginning of my code, where I'm
> attempting to import a method.  Below is a snippet of the code
>
> import sys
> print 'Imported Sys'
> from pscape.xml.handler import pscape_xml_parser
> print  'Imported XML Parser'
>
> The import sys statement works fine.  The import of pscape_xml_parser is
> failing. pscape.xml.handler is within my site-packages directory.  I have
> checked  python's sys.path from within ASP, and
> c:\python22\lib\site-packages is in the path.  This code runs fine when
> executed from within the python interpreter, but not when called from ASP.
>
> Any idea what I'm doing wrong here?  I'm sure it must be something very
> simple.  I'm running this under Windows2000 Server, IIS5.0, Python 2.2.2,
> and win32all-150.

perhaps the webservers user (Normaly IUSR_......) has no rights to access
the files within site-packages?

Ciao Ulrich






More information about the Python-list mailing list