Several ways to run Python code in Pycharm

Source: Internet
Author: User

Python code in the Pycharm run will have a variety of wonderful problems, for example, password input does not show or no hint, give us some trouble, here are several ways to run the code:

First, run directly (Run button or shortcut key SHIFT+F10)

1. Enter the Pychram main interface, enter the code, the direct run can be;

Run the. py file under 2.Termnal

In the main interface of Pycharm, click Termnal, go to the command panel, select the path, enter to execute the corresponding file (Python file name. py).

3. Terminal command line

1> into the Pycharm main interface, select the file or directory to be executed;

2> right button, select Show in Explore, pop up local dialog box;

3> in the Address bar to enter CMD, directly into the current directory;

4> Enter the python file name on the command line. py, the file is executed and the result is displayed.

Note: Select a single file, execute only a single file, and select a directory to execute all the py files in this directory.

Several ways to run Python code in Pycharm

Related Article

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.