FAQ
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.

-½M=-

Search Discussions

  • Ulrich Petri at Jul 19, 2003 at 1:31 am
    "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
  • BDM at Jul 21, 2003 at 12:17 pm
    I thought about that one too. I checked, and "Everyone" has access to
    site-packages and the folders below it. Is there any sort of library path
    setting I need for Python to work with ASP under Win2000?

    "Ulrich Petri" <ulope at gmx.de> wrote in message
    news:bfa6uk$cdshr$1 at ID-67890.news.uni-berlin.de...
    "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

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
grouppython-list @
categoriespython
postedJul 18, '03 at 6:38p
activeJul 21, '03 at 12:17p
posts3
users2
websitepython.org

2 users in discussion

BDM: 2 posts Ulrich Petri: 1 post

People

Translate

site design / logo © 2022 Grokbase