Pycharm Editor Tips Auto-Import module detailed

Source: Internet
Author: User
This article mainly introduces the Pycharm editor skills of the automatic import module, and now share to everyone, but also to make a reference. Come and see it together.

We often inadvertently use some of the classes and modules that have not yet been imported in the programming process, in which case the pycharm will help us locate the module file and add it to the import list, which is known as the Auto-import module feature. This article introduces to you about the Pycharm editor skills of the auto-import module of the relevant information, the need for friends can refer to.

Objective

Pycharm can easily manage the Python interpreter (if multiple words are installed), as well as third-party modules, packages. Pycharm is the preferred IDE for many Python developers, and if a tool can be used skillfully, it often has a multiplier effect, a variety of shortcut keys, refactoring, and debugging techniques. Since Python is a dynamic language, it's easy to have a static language for auto-importing package modules, but we have pycharm and can be very powerful.

Usually write code, to refer to the system comes with the module or a third-party module, or even the other parts of the project, sometimes the code quickly write a full screen, in order to import a module, we have to put the cursor to the top of the file, the module package name manually imported into, and then back to the bottom of the file happily write code, So repeatedly switching back and forth, good trouble. One of the principles of development is that Don ' t repeat yourself, and repetitive labor should be done automatically.

In fact, we only need a simple two-step configuration to let Pycharm automatically import modules

First step: Pycharm->perferences->editor->auto Import

Step Two: Pycharm->perferences->keymap

As simple as this, after the setup is complete, experience the effect. Import the random module, CTRL + SPACE (SPACEBAR press twice) will automatically pop up the optional module list, move up and down to switch.

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.