[Python-Dev] .pth files should never contain python (original) (raw)
Chris Withers chris at simplistix.co.uk
Sat May 16 17:00:39 CEST 2009
- Previous message: [Python-Dev] PEP 382: little help for stupid people?
- Next message: [Python-Dev] PEP 382: Namespace Packages
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Paul Moore wrote:
2009/5/9 Chris Withers <chris at simplistix.co.uk>:
Martin v. Löwis wrote:
I thought .pth files just had python in them? Not at all - they never did. They have paths in them. I've certainly seen them with python in, and that's what I hate about them... AIUI, there was a small special case that lines starting with "import" are executed (see the source of site.py for details). This exception has been exploited (some would say "abused", but I'm trying to be unbiased here) by setuptools, at least, to do path manipulations and such.
Abused is definitely the right word, I suppose it's too late to correct this bug?
How about for Python 3?
cheers,
Chris
- Previous message: [Python-Dev] PEP 382: little help for stupid people?
- Next message: [Python-Dev] PEP 382: Namespace Packages
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]