This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author Antony.Lee
Recipients Antony.Lee, Ivan.Pozdeev, barry, brett.cannon, christian.heimes, eric.smith, eric.snow, ethan smith, mhammond, ncoghlan, pitrou, takluyver, terry.reedy
Date 2018-10-25.20:47:07
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
There are a number of packages that can "self-import" into any Python process depending on the presence of an environment variable, by installing a pth file that contains something like `import os; __import__("thepkg") if os.environ.get("THEENVVAR") else None`.  Examples include colorization of logging output ( or installation of a trace function (

If the pth mechanism goes away, a preload system should definitely be present to provide a replacement; it should again support multiple packages each installing their own hook.
Date User Action Args
2018-10-25 20:47:08Antony.Leesetrecipients: + Antony.Lee, mhammond, barry, brett.cannon, terry.reedy, ncoghlan, pitrou, eric.smith, christian.heimes, eric.snow, takluyver, Ivan.Pozdeev, ethan smith
2018-10-25 20:47:07Antony.Leesetmessageid: <>
2018-10-25 20:47:07Antony.Leelinkissue33944 messages
2018-10-25 20:47:07Antony.Leecreate