◐ Shell
clean mode source ↗

Message 159043 - Python tracker

> The semantics of "associated application" change considerably from
> operating system to operating system.  As an example,
> ``os.startfile("a.py")`` will usually run `a.py` in the Python
> interpreter, while ``xdg-open a.py`` it will usually open the source
> code in an editor on Linux.

Outch.  I think the behavior should be more similar than that, i.e. that the function should use startfile with the edit action on Windows.

About the name: I thought about “edit”; it really means open_file_in_editor.  BTW shutil feels the wrong place for this but I don’t think we have anything better.