This python module forwards calls to Windows binaries from WSL (Windows Subsystem for Linux) bash shells also converting any path style arguments starting with /mnt/ to their Windows equivalent. Without this conversion the Windows binaries will attempt to open Linux file paths and fail.
Invoking Sublime Text 3 from a WSL bash prompt:
$ wslexeshim.py "/mnt/c/Program Files/Sublime Text 3/subl.exe" -n -w /mnt/d/README.md
Setting the git text editor to Sublime Text 3:
$ git config --global core.editor "wslexeshim.py '/mnt/c/Program Files/Sublime Text 3/subl.exe' -n -w"
Example .hgrc to set the Mercurial text editor to Sublime Text 3:
[ui]
editor = wslexeshim.py "/mnt/c/Program Files/Sublime Text 3/subl.exe" -n -w
Setting the preferred editor for version control systems (eg. Git, Mercurial) within a WSL session to a Windows binary causes the version control system to invoke the editor with Linux style paths. As the Windows binary text editor is expecting Windows style paths this causes it to open the wrong file or even fail completely.
This python module was written to act as a shim around the Windows text editor and convert the paths before invoking the executable.