Getting XML module to work in windows.

Peter Hansen peter at engcorp.com
Mon May 27 19:35:34 EDT 2002


Peter Hansen wrote:
> 
> joel jensen wrote:
> >
> > C:\Documents and Settings\joel\Desktop\test>xml.py
> > Traceback (most recent call last):
> >   File "C:\Documents and Settings\joel\Desktop\test\xml.py", line 1, in
> > ?
> >     from xml.sax import saxutils
> >   File "C:\Documents and Settings\joel\Desktop\test\xml.py", line 1, in
>                                                      ^^^^^^^^
> > ?
> >     from xml.sax import saxutils
> > ImportError: No module named sax
> 
> Don't name your own module "xml.py".  It is hiding the real
> xml package in the Python installation....

Oh, and when you remove it, make sure you delete the xml.pyc
file that's still hanging around, if any.... this disabled
my own environment for a few minutes until I figured it out. :)

-Peter



More information about the Python-list mailing list