[issue28137] Windows sys.path file should be renamed

Steve Dower report at bugs.python.org
Thu Sep 15 11:18:10 EDT 2016


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 __main__.py file caused that file to always run and every argument gets passed to that instead? The purposes seem separate enough to use two files. And we could implement that part easily enough in PC/WinMain.c, as Paul suggests.

Both of these options are fairly aggressive wrt other command line options (i.e. how do you specify unbuffered IO? how do you set the hash seed?), but the point is really that you wouldn't use them with these options - if you don't want to build your own main() function, the defaults should be good enough.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue28137>
_______________________________________


More information about the Python-bugs-list mailing list