Trouble installing PmwContribD - no "PmwContribD.pth"

Gordon McMillan gmcm at hypernet.com
Fri Sep 14 00:54:59 CEST 2001


Russell Whitaker wrote:

 
> I'm needing the functionality documented in Doug Hellmann's
> PmwContribD class MCScrolledListBox.py.  In the docs (from
> what I assume to be the canonical distributions at:
> "http://sourceforge.net/projects/pmwcontribd/") is mentioned
> a file "PmwContribD.pth" (also mentioned only here in a search:
> "http://groups.google.com/groups?q=pmwcontribd.pth&hl=en&rnum=1&selm=399
> BF0AA.1590C08D%40proceryon.at") which is not included in either the .gz
> or .zip archive on SourceForge (v r1_16).

A .pth file is a text file with one directory per line.
Those directories will be added to your sys.path.
The .pth file is typically (on Windows) put in your Python directory.
So if you install a package as follows:

D:\
   mypackages\
      spam\ 
         __init__.py
         other stuff...
      andeggs\
         __init__.py
         yet more stuff...

then a .pth file that says:
D:/mypackages
will make both the spam and andeggs packages available.

Typically, *nix doesn't use .pth files, but would put the
spam and andeggs packages into site-packages.

> I notice also that there's no __init__.py in the extracted
> distro, either.

Some zip tools don't like 0 length files. Just create one.
 
- Gordon



More information about the Python-list mailing list