I have the same problem. I believe it does not come from the character ^ or ¨ itself, but the fact that, on the French keyboard, they appear in an intermediate state so that you can type a letter that can be accentuated (i.e. typing "¨ + e" gives out the "ë" letter. This intermediate state may not be supported by the app, which makes the program crash. Try copy-pasting the character and see if that works. Otherwise, maybe try another python editor.