<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
<html>
May I follow up this useful advice with another question?
<p>I just installed the xml package on my Windows98 machine, and I am having
some trouble getting Python to see some of the modules in there.
<p>For example, when I import one of the SAX drivers using <tt>from xml.sax.drivers
import drv_sgmllib, </tt>I don't have any trouble.
<br><tt>from xml.parsers import sgmllib </tt>works fine, too.
<p>However, when I try to load the xmlproc module from the package (e.g.
<tt>fromxml.parsers.xmlproc import xmlproc</tt>) I get<tt> ImportError:
No module named xmlproc.</tt>  <tt>import xml.parsers.xmlproc</tt>
also fails. So does <tt>from xml.parsers import *</tt>, though in this
case because the xmlproc module is not actually loaded, not because there
is any error message.
<p>I've got the actual DLLs in my path
<br>The freakin' module is sitting right there in <tt>xml\parsers\xmlproc\xmlproc.py</tt>l,
<br>I've got my Pythonpath set up to see the xml package (at Python\Lib),
<br>The __init__.py files at the two levels in the package both point down
into the...
<p>...wait a second...in the parsers\__init__.py file, the parsers sitting
right there are named in the same way as the xmlproc actually sitting at
xmlproc\xmlproc.pyc...is this a problem?
<p><tt>__all__ = ['xmllib', 'sgmllib', 'xmlproc']</tt>
<p>For whatever reason, I can't seem to get at this xmlproc module. Can
someone talk me through this?
<p>Thanks a lot
<br>Ian
<br> 
<p>Kevin Cazabon wrote:
<blockquote TYPE=CITE>The problem actually is that your module isn't on
the PYTHONPATH.  So, the
<br>python interpreter can't find it.
<p>calling it from a DOS shell, as suggested by Dana Booth, will work fine,
as
<br>long as Python.exe is on your Windows PATH, which it should be if you
used
<br>the installer.
<p>The other thing you can do is add the directory that your module is
in to
<br>the PYTHONPATH... which can be done through PythonWin, or in the Windows
<br>registry.
<p>Kevin.
<br> </blockquote>

<p><br>--
<br>Ian Oeschger
<br>Principal Writer, Netscape
<br> </html>