I\'ve encountered an extremely confusing problem. Whatever I type into the Python interpreter returns \"Invalid Syntax\". See examples below. I\'ve tried fooling around w
This is a worry:
C:\Program Files\Python31>.\python
It is never a very good idea to run software with the current directory set to the software installation directory. You run the risk of creating files that interfere with the running of the software. When you start getting bugs and weird behaviour, the consequent thrashing about can get the situation completely out of control.
This is better:
C:\somewhere_else_with_no_spaces>"c:\program files\python31\python"
Best is to keep it out of "program files". Unless I'm misremembering, the suggested installation folder would be C:\Python31 which is good because you don't need the quotes like you do whenever you use "program files". There is AFAIK no good reason for having software in "program files".
Some diagnostics:
A. open up a Command Prompt window.
B. type this: dir "c:\program files\python31"
C. copy/paste the result from step B into an edit of your question i.e. don't put it in a comment.
It would help if you answered (in an edit of your question) the question that somebody asked about keyboard macros ... also consider the possibility of over-smart keyboards, and of having multiple IMEs and not using the "correct" one. Also, is this behaviour happening with any software other than Python?