[Pythonmac-SIG] .PTH files?

Jack Jansen Jack.Jansen at cwi.nl
Wed Dec 17 15:29:16 EST 2003


On 17-dec-03, at 18:56, Schollnick, Benjamin wrote:
>
> You can do that?  I admit, I have not dug for information on the .PTH
> files...  But I thought that they had one purpose, and only one way to 
> be
> used....
>
> Place a directory path in the .PTH file, so that you can import 
> something
> that was not in the site-lib, or lib path.
>
> Is there more advanced ways to use .pth files?  I don't recall seeing 
> the
> .pth files really documented anywhere?  Did I miss something?

Well... I think I would call this "creative use". The special case that 
lines
starting with "import" is documented in site.py. The fact that you can 
do more
than just an import may not have been intentional when the feature was 
designed:-)
--
Jack Jansen, <Jack.Jansen at cwi.nl>, http://www.cwi.nl/~jack
If I can't dance I don't want to be part of your revolution -- Emma 
Goldman




More information about the Pythonmac-SIG mailing list