.pth configuration method not working

John Machin sjmachin at lexicon.net
Sat Feb 3 18:37:11 EST 2007


On Feb 4, 10:03 am, "Mark" <cree... at gmail.com> wrote:
> Sys.path doesn't recognize any directories that I add using the .pth
> method.   I'm running Windows XP if that helps diagnose the problem.
>
> Here is what I've done:
>
> The original output of sys.path:
> ['C:\\Python25\\Lib\\idlelib', 'C:\\WINDOWS\\system32\\python25.zip',
> 'C:\\Python25\\DLLs', 'C:\\Python25\\lib', 'C:\\Python25\\lib\\plat-
> win', 'C:\\Python25\\lib\\lib-tk', 'C:\\Python25', 'C:\\Python25\\lib\
> \site-packages']
>
> I've added a file "MyPaths.pth" to  "C:\Python25\".   MyPaths.pth
> contains one line that reads: C:\Python25\MyModules.   For some reason
> sys.path won't ever recognize that C:\Python25\MyModules exists.  This
> is very frustrating because I know that this method is supposed to
> work.  ANY help would be appreciated.
>

If you were to do a Google search for "pth" in this newsgroup, the
first 2 or 3 results would tell you what to do, *and* point you to
which section of the Python documentation covers .pth files.

BTW, are YourModules specific to Python 2.5? If not, what do you plan
to do when Python 2.6 is released?

HTH,
John




More information about the Python-list mailing list