This does work out of the box because py.exe is run when you execute a .py in the CMD.
Yep, but the constraint is it has to run in Cygwin's bash terminal. Does it honor windows file associations ? I have some doubts (sorry I don't have a windows available to test the hypothesis). If it works, this is a valid solution. Probably the best option for us is to install python via Cygwin, as already suggested. We are in a kind of no man's land playing with Cygwin and pure windows python packages and expecting the linux behavior. I imagine this is the reason why people don't complain that much about it. Python is not critical in our business, the problem went largely unnoticed until our scripts become complicated enough and started to use python3 only features. Fred