Introduction to Python (a): PTVs write Python program, debug mode input () prompt text garbled problem

Source: Internet
Author: User

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.