Steve Dower <steve.do...@python.org> added the comment:
> Perhaps generalize this as splitext(basename(sys.executable))[0] in > order to support names other than "python" and "pythonw". It would have > to handle quoting enough to ignore an initial double quote when parsing > the executable name out of an args string, or _winapi could wrap the > shell's CommandLineToArgvW function to handle this. This is where we've hit the point of complexity that it would have to be added as a new API. And since it's now opt-in, we may as well document that shutil.which() is the recommended way to resolve a filename against PATH (and make that work properly... ISTR it has some inconsistencies with the OS). ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue38905> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com