Thonny would be a lot more useful if the editor was smart enough to recognize that a loaded file is a python script . Under Linux/BSD/Unix this could be achieved by looking for the sub-string "python" ...