Windows: Python3.3 pep397 launcher fails

Bug #1112207 reported by Andreas Roehler
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
python-mode.el
Expired
Undecided
Unassigned

Bug Description

Am 31.01.2013 10:03, schrieb Thomas Heller:
> Has someone managed to patch python-mode.el to use
> the PEP 397 python launcher when you hit C-c C-c?
>
> It seems that emacs should parse the shebang line in the edited
> python script and pass the corresponding arguments to py.exe.
>
[ ... ]
Am 01.02.2013 00:59, schrieb Vinay Sajip:>
Thomas Heller <theller <at> ctypes.org> writes:
>
>> What I meant to write is this:
>>
>> when the shebang line in script.py contains this:
>> #!/usr/bin/python3.1-32
>> then emacs SHOULD run
>> py.exe -3.1-32 script.py
>> and the launcher runs
>> c:\Python31\python.exe script.py
>
> IMO it would be better for emacs to just run
>
> py.exe script.py
>
> 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 :-))
>
> Regards,
>
> Vinay Sajip
>
>

Changed in python-mode:
importance: Undecided → High
Changed in python-mode:
importance: High → Medium
Changed in python-mode:
assignee: nobody → Andreas Roehler (a-roehler)
milestone: none → 6.2.0
Revision history for this message
Andreas Roehler (a-roehler) wrote :

A way to solve this might be introducing more specific py-command variables:

py-python2-command
py-python3-command

Already available in trunk is

py-ipython-command

This commands should take the full path at windows.

py-choose-shell reading the shebang might than map accordingly.

Changed in python-mode:
status: New → In Progress
Revision history for this message
Andreas Roehler (a-roehler) wrote :
Revision history for this message
Andreas Roehler (a-roehler) wrote :

IIUC this provides a feature --selecting the right Python-- which python-mode.el already delivers. It seems rather useful outside of Emacs. However, if developers find it useful to have a patched version running py.exe, it should be possible to realise. Please open a branch for that, will assist there.

Changed in python-mode:
status: In Progress → Incomplete
milestone: 6.2.0 → none
importance: Medium → Undecided
assignee: Andreas Roehler (a-roehler) → nobody
summary: - Python3.3 pep397 launcher fails
+ Windows: Python3.3 pep397 launcher fails
Revision history for this message
Launchpad Janitor (janitor) wrote :

[Expired for python-mode.el because there has been no activity for 60 days.]

Changed in python-mode:
status: Incomplete → Expired
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.