[XML-SIG] interpreter problem
Erez Klein
eklein@learninginsights.com
Thu, 30 May 2002 15:21:06 -0500
This message is in MIME format. Since your mail reader does not understand
this format, some or all of this message may not be legible.
------_=_NextPart_001_01C20817.870CFAC0
Content-Type: text/plain;
charset="iso-8859-1"
I am experiencing a problem with the interpreter when trying to import the
xml.sax module.
When I run the following 1 line program (saved in a file called xml.py):
import xml.sax
by launching the interpreter like this: python.exe c:\xml.py
I get this error:
Traceback (most recent call last):
File "c:\xml.py", line 1, in ?
import xml.sax
File "c:\xml.py", line 1, in ?
import xml.sax
ImportError: No module named sax
At first, I thought it was an environment variable problem, so I printed out
sys.path, but it does have c:\python21\lib, which is where the module is
installed.
Interestingly, if I change the import statement to "import xml" (without
sax) it doesn't complain. Also, when I launch the interpreter in interactive
mode and try to import xml.sax, I get no errors.
I am running python 2.1, and pyxml 0.7.1 on windows 98.
Is there anything I installed improperly? I appreciate your assistance.
Erez Klein
IT Development Manager
Learning Insights, Inc
------_=_NextPart_001_01C20817.870CFAC0
Content-Type: text/html;
charset="iso-8859-1"
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
<META content="MSHTML 5.50.4807.2300" name=GENERATOR></HEAD>
<BODY>
<DIV><SPAN class=080460520-30052002><FONT size=2>I am experiencing a problem
with the interpreter when trying to import the xml.sax
module.</FONT></SPAN></DIV>
<DIV><SPAN class=080460520-30052002><FONT size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=080460520-30052002><FONT size=2>When I run the following 1 line
program (saved in a file called xml.py):</FONT></SPAN></DIV>
<DIV><SPAN class=080460520-30052002><FONT size=2>import
xml.sax</FONT></SPAN></DIV>
<DIV><SPAN class=080460520-30052002><FONT size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=080460520-30052002><FONT size=2>by launching the interpreter
like this: python.exe c:\xml.py</FONT></SPAN></DIV>
<DIV><SPAN class=080460520-30052002><FONT size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=080460520-30052002><FONT size=2>I get this
error:</FONT></SPAN></DIV>
<DIV><SPAN class=080460520-30052002><FONT size=2>Traceback (most recent call
last):<BR> File "c:\xml.py", line 1, in ?<BR> import
xml.sax<BR> File "c:\xml.py", line 1, in ?<BR> import
xml.sax<BR>ImportError: No module named sax<BR></FONT></SPAN><SPAN
class=080460520-30052002><FONT size=2></FONT></SPAN></DIV>
<DIV><SPAN class=080460520-30052002><FONT size=2>At first, I thought it was an
environment variable problem, so I printed out sys.path, but it does have
c:\python21\lib, which is where the module is installed. </FONT></SPAN></DIV>
<DIV><SPAN class=080460520-30052002><FONT size=2>Interestingly, if I change the
import statement to "import xml" (without sax) it doesn't complain. Also, when I
launch the interpreter in interactive mode and try to import xml.sax, I get no
errors.</FONT></SPAN></DIV>
<DIV><SPAN class=080460520-30052002><FONT size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=080460520-30052002><FONT size=2>I am running python 2.1, and
pyxml 0.7.1 on windows 98.</FONT></SPAN></DIV>
<DIV><SPAN class=080460520-30052002><FONT size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=080460520-30052002><FONT size=2>Is there anything
I installed improperly? I appreciate your assistance.</FONT></SPAN></DIV>
<DIV><SPAN class=080460520-30052002><FONT face=Arial
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=080460520-30052002><FONT face=Arial size=2>Erez Klein</FONT>
<BR><FONT face=Arial size=2>IT Development Manager</FONT><BR><FONT face=Arial
size=2>Learning Insights, Inc</FONT> <BR></DIV></SPAN>
<DIV><SPAN class=080460520-30052002><FONT
size=2> </DIV></FONT></SPAN></BODY></HTML>
------_=_NextPart_001_01C20817.870CFAC0--