The first two days have written the Python Primer (i), which mentions that using Vs2013+ptvs for Python development.
In preparation for the second article to write a demo, found a problem, various solutions without fruit, some tangled
The input function in Python is "input" (), which is equivalent to C # 's Console.ReadLine (), waiting for user input.
The input method can also be written in this way, input ("Please enter"), which is the hint text.
For a moment we test the code:
Print (" print ") input (' print ')
Case 1:
We do not debug the operation, the results are as follows:
We found that the interpreter used both cmd.exe,print and input to output normal Chinese.
Case 2:
We debug the operation, the results are as follows:
We found that: The interpreter is using Python.exe,print printed Chinese normal, input in the hint Chinese is garbled.
Case 3:
We find the debug Python.exe, copy the. py file that you just debugged to the same directory, and execute the file with the following results:
We found that both print and input have normal output in Chinese.
What's the situation?
If there is a problem with my code, then why is the above directly executed file OK?
Is it a PTVs bug?
I have asked: https://q.cnblogs.com/q/92406/
Please guide twos, do not directly reply: Change a ide/change an editor ....
Introduction to Python (a): PTVs write Python program, debug mode input () prompt text garbled problem