[issue28137] Windows sys.path file should be renamed

2017-03-31 Thread Donald Stufft
Changes by Donald Stufft : -- pull_requests: +992 ___ Python tracker ___ ___

[issue28137] Windows sys.path file should be renamed

2016-09-17 Thread Steve Dower
Steve Dower added the comment: Decided to go with "DLLNAME._pth" or "EXENAME._pth", since using ".pth" with "import site" causes files to be reevaluated. -- resolution: -> fixed stage: needs patch -> resolved status: open -> closed ___ Python

[issue28137] Windows sys.path file should be renamed

2016-09-17 Thread Roundup Robot
Roundup Robot added the comment: New changeset 7b47c98f24da by Steve Dower in branch '3.6': Issue #28137: Renames Windows path file to ._pth https://hg.python.org/cpython/rev/7b47c98f24da -- nosy: +python-dev ___ Python tracker

[issue28137] Windows sys.path file should be renamed

2016-09-15 Thread Paul Moore
Paul Moore added the comment: I'd prefer not to hard code __main__.py, as I'd quite like to be able to have a number of copies of the executable, each running its own script. (I foresee putting all my little Python utility scripts in a directory with a Python installation and a set of

[issue28137] Windows sys.path file should be renamed

2016-09-15 Thread Steve Dower
Steve Dower added the comment: I like it. Making the name match the exe name should have been obvious, and if nobody is opposed to simply aborting on unsupported syntax (i.e. imports other than site) I don't actually mind making it .pth. It's a separate idea, but what if the presence of a

[issue28137] Windows sys.path file should be renamed

2016-09-15 Thread Paul Moore
Paul Moore added the comment: You can actually handle this already, with a simple wrapper program (based on the one in PC\WinMain.c): /* Minimal main program -- everything is loaded from the library. */ #include "Python.h" #define WIN32_LEAN_AND_MEAN #include int wmain() { wchar_t

[issue28137] Windows sys.path file should be renamed

2016-09-15 Thread Wolfgang Langner
Wolfgang Langner added the comment: If this is only for the use case of embedded distribution we are now only to steps away to provide a easy custom shipping of applications for Windows. 1. Take the file name of the executable to load a custom EXECUTABLENAME.path file 2. Allow to specify a

[issue28137] Windows sys.path file should be renamed

2016-09-13 Thread Steve Dower
Steve Dower added the comment: Part of the reason it was so cute is that it directly specifies the contents of sys.path. But I like __syspath__.path (I'm scared of making it a ".ini" because I don't want to parse a more complex format). -- ___

[issue28137] Windows sys.path file should be renamed

2016-09-13 Thread Christian Heimes
Christian Heimes added the comment: I don't want to start a bike-shedding discussion but how about a name that can't be confused with a module and attribute? It's hard to distinguish between sys.path and sys.path in a discussion. How do you like the idea of a file name like __syspath__.path?

[issue28137] Windows sys.path file should be renamed

2016-09-13 Thread Steve Dower
New submission from Steve Dower: The Windows getpath implementation gained the ability to find and read a sys.path file to skip reading the registry. While the name is cute, it really ought to start with a leading underscore (i.e. "_sys.path") to indicate that it is very at-your-own-risk. The