Pycharm learning tutorial (2) code style, pycharm tutorial
How to Create a Python project with the Pycharm code style is as follows:
1. Subject
This section describes how to create a Python project and use the Pycharm code style. You will see that Pycharm makes your source code very concise and beautiful with appropriate indentation and spaces. Therefore, Pycharm is also a powerful tool for code quality management.
This section does not show you how to use Python for programming. For more information about Python programming, see: Python programming.
2. Preparations
Before starting, confirm the situation:
(1) install software of Pycharm2.7 or later.
(2) You have created a Python Project (File → New Project). For details, see Pycharm to create a Project File.
(3) Two directories src and test_dir (File → New or Alt + Insert) have been added to the project. For details, see Pycharm to create a project File.
(4) the corresponding Python File (File → New or Alt + Insert) has been added to the project directory. For details, see Pycharm to create a project File.
3. Code error highlighted Mode
Open a new Python file for editing (F4). The file contains two lines of code by default: the author's name and project name. These two lines of code appear because the Python file is created based on the file template during creation, so the two variables are predefined.
Next, enter the keyword class. When you start typing, the spelling prompt mechanism of Pycharm will immediately list the candidate items to help you complete the Code:
(Refer to the Pycharm spelling tips to learn about Pycharm.