[Python-Dev] pep-3108.txt

Barry Warsaw barry at python.org
Wed Jan 3 14:12:56 CET 2007


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Jan 3, 2007, at 6:07 AM, M.-A. Lemburg wrote:

> Regarding application specific package setups:
>
> In my experience it's better to have an application specific
> sys.path setup function that manages this, rather than trying
> to manipulate PYTHONPATH or trying to tweak Python's stdlib
> site.py into using some particular way of setting up application
> specific paths which then makes interop harder for all
> applications using Python, rather than just the few that
> require such setups.
>
> The application can then call this path setup function early
> on in the startup phase to make sure that the rest of the
> startup and the application's main code then imports the
> right modules and packages.

Oh, I totally agree MAL.  It's what I've done in Mailman for ages.   
What makes it more complicated is when you have dozens of entry  
points (read: command line scripts), but it's solvable.

I guess when I read "PYTHONPATH" I also read "sys.path", so now that  
I've slept a little, never mind!

- -Barry

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (Darwin)

iQCVAwUBRZur2HEjvBPtnXfVAQIZjwP/Zbcz/aUooJtca/apUSkHwfhnTvMOLiiQ
uoWOltYJnwqy3S9EYpUoan0rXBVPd04ygWf9tgZiioTaVHAuXYTLL7SikpiQTxge
VxLQA6AegHlGMFgtuqTKNYDNeG2B9dlpHbT05ZSVqVaBeWi6E/ap/NNk7ufZ//pD
3F94t07yDaE=
=OHMX
-----END PGP SIGNATURE-----


More information about the Python-Dev mailing list