Personal tools
You are here: Home Lists ZPUG DC List Archives 2004 2004-12 Python with ASP import question / Derek Willis <dwillis@gmail.com>
Navigation
Log in


Forgot your password?
New user?
Mailing Lists
You can read our ZPUGDC mailing list archives online.
You can subscribe to our mailing list:
Book Review

The Definitive Guide to Plone

Reviewer: joel
 

Python with ASP import question / Derek Willis <dwillis@gmail.com>

Python with ASP import question
Derek Willis <dwillis(at)gmail.com>
2004-12-07 15:24:03 [ FULL ]
Folks,

I've set up Python to work within ASP scripts on an IIS server we have
at my office. The standard tests work fine, but when I put code in the
ASP file that imports Python modules I get an error. Not all modules,
of course; re and sys work fine, but urllib and csv do not, for
example. When I try urllib I get the following error:

Python ActiveX Scripting Engine error '80020009'

Traceback (most recent call last): File "<Script Block >", line 3, in
? import urllib ImportError: No module named urllib

/derekjunk/python.asp, line 1

This mystifies me, because all I did was replace "sys" with "urllib"
in the import statement,  and urllib.py does reside within the /Lib/
subdirectory in my Python installation. I'm on Win2k with IIS, using
ActiveState's 2.4 version. The IIS is configured to allow full access
for users, so I don't believe it is a question of rights.

Any suggestions are most welcomed.

Derek

Re: [ZPUGDC] Python with ASP import question / Jules <jules@jules.com>

Re: [ZPUGDC] Python with ASP import question
Jules <jules(at)jules.com>
2004-12-07 16:18:13 [ FULL ]
It looks like there's an Active Python list that's maintained by Active
State.

http://www.google.com/search?q=%22Python+ActiveX+Scripting+Engine+error%22+ImportError+site%3Aaspn.activestate.com

If nobody on the list here jumps up with a solution you might want to
give it a shake.

Back when I was cursed^H^H^H^H^H^H used IIS (about 150 years ago in Web
time) I don't remember anything like this.

Have you written a script to roll over each of the modules and note
which ones miss? 

And if you

    from urllib import *

is that better?

Cheers,
Jules

Derek Willis muttered about this on Tue, Dec 07, 2004 at 04:34:33PM -0500:
|Folks,
|
|I've set up Python to work within ASP scripts on an IIS server we have
|at my office. The standard tests work fine, but when I put code in the
|ASP file that imports Python modules I get an error. Not all modules,
|of course; re and sys work fine, but urllib and csv do not, for
|example. When I try urllib I get the following error:
|
|Python ActiveX Scripting Engine error '80020009'
|
|Traceback (most recent call last): File "<Script Block >", line 3, in
|? import urllib ImportError: No module named urllib
|
|/derekjunk/python.asp, line 1
|
|This mystifies me, because all I did was replace "sys" with "urllib"
|in the import statement,  and urllib.py does reside within the /Lib/
|subdirectory in my Python installation. I'm on Win2k with IIS, using
|ActiveState's 2.4 version. The IIS is configured to allow full access
|for users, so I don't believe it is a question of rights.
|
|Any suggestions are most welcomed.
|
|Derek
|
|-- 
|To unsubscribe send an email with subject 'unsubscribe' to
zpugdc(at)lists.zpugdc.org.
|Please contact zpugdc-owner(at)lists.zpugdc.org for questions.
|http://zpugdc.org/lists/zpugdc/archive/2004/2004-12/1102454643531
|
[...]

Powered by Plone, the Open Source Content Management System

This site conforms to the following standards: