Eryk Sun <eryk...@gmail.com> added the comment:
Whether it should be this way or not, here's how it currently works. The builtin virtual paths all end with "python": static SHEBANG builtin_virtual_paths [] = { { L"/usr/bin/env python", TRUE }, { L"/usr/bin/python", FALSE }, { L"/usr/local/bin/python", FALSE }, { L"python", FALSE }, { NULL, FALSE }, }; parse_shebang() loops over this list, simply matching up to the length of each virtual path. Thus "/usr/bin/env python-xyz" is matched as a virtual path. Supporting user configured "python*" commands would require more sophisticated matching. A virtual command has to consume a suffix that looks like a version string in the form "[x[.y]][-32|-64]", as determined by validate_version(). But otherwise configured "python*" commands don't have to be matched as virtual commands. ---------- nosy: +eryksun _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue31879> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com