After installing the WSL I have two python installations on my PC, the Windows one and the one in the WSL. The developers state here that you "can invoke Windows binaries directly from the WSL command line," however, when I try to invoke the python.exe file I get the following odd behavior:
myprompt$ python.exe
1
2
print("test")
print "test"
File "<stdin>", line 4
print "test"
^
SyntaxError: Missing parentheses in call to 'print'
myprompt$
Whereas if the interactive interpreter was running, I'd get:
myprompt$ python.exe
>>>1
1
>>>2
2
print("test")
test
print "test"
File "<stdin>", line 1
print "test"
^
SyntaxError: Missing parentheses in call to 'print'
myprompt$
Its like the interpreter is running, but its not giving me a prompt, and it exits at the first error. Interestingly, if I navigate to the same directory and run python.exe from a windows command prompt, everything works fine.
P.S.: I found the location of the Windows Python install by running the sys.executable command in Python.