Pycharm learning tutorial (2) code style, pycharm tutorial

Source: Internet
Author: User

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.

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.