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