On 26 November 2016 at 19:34, Wes Turner <[email protected]> wrote: > On Friday, November 25, 2016, Nick Coghlan <[email protected]> wrote: >> By contrast, if we only propose deprecating "import" lines in ".pth" >> files, and also propose a more explicit approach to automatic code >> execution at interpreter startup, then it's only folks relying on the >> arbitrary-code-execution feature that would incur any migration costs. >> The language level pay-offs to justify that cost would be: >> >> - simplification of the current systems for implicit code execution at >> start-up > > There's > > python -m site > > But is there a -m tool for checking .pth files? > (For code in .pth.py files)?
Not currently, there's only the code that implicitly gets called from site.main() (which is in turn called as a side effect of importing the site module). So even though that machinery is already there in a pure Python module in every Python installation, none of it is exposed as a public Python-level API. Cheers, Nick. -- Nick Coghlan | [email protected] | Brisbane, Australia _______________________________________________ Distutils-SIG maillist - [email protected] https://mail.python.org/mailman/listinfo/distutils-sig
