install/import modules, /site-packages

Peter Hansen peter at engcorp.com
Fri Apr 25 11:23:02 EDT 2003


Randy Heiland wrote:
> 
> I need some basic Python module knowledge.  On my RH Linux installation,
> I've got the following:
> 
> /usr/local/lib/python2.2/xml
> and
> /usr/local/lib/python2.2/site-packages/_xmlplus
> 
> and when I >>> import xml.sax, I get:
> '/usr/local/lib/python2.2/site-packages/_xmlplus/sax/__init__.pyc'
> 
> How does this module (in site-packages) take precedence over the other?

"Use the source, Luke."  

Look in lib/python2.2/xml/__init__.py and all will be revealed.  :-)

-Peter




More information about the Python-list mailing list