Python launcher (PEP 397) and emacs python-mode.el

Vinay Sajip vinay_sajip at
Fri Feb 1 00:59:31 CET 2013

Thomas Heller <theller <at>> writes:

> What I meant to write is this:
> when the shebang line in contains this:
>    #!/usr/bin/python3.1-32
> then emacs SHOULD run
>    py.exe -3.1-32
> and the launcher runs
>    c:\Python31\python.exe

IMO it would be better for emacs to just run


and py.exe can read the shebang and do the right thing. This saves the emacs code
from having to duplicate the shebang line processing logic that py.exe uses
(which, as we know, is unusual. So for a cross-platform you can have a shebang
line of #!/usr/bin/python3.2, and on Windows it will still call the appropriate
Python 3.2 even if it's not in /usr/bin, as there's no /usr/bin :-))


Vinay Sajip

More information about the Python-list mailing list