[Python interface automation] Learn from scratch Python automation (1): Environment construction

Source: Internet
Author: User

First step: Install the Python build environment

Before installing the Python compilation environment, you must ensure that the JDK is installed, and if it is installed, refer to https://jingyan.baidu.com/article/6dad5075d1dc40a123e36ea3.html

Python Installation: https://www.python.org/downloads/

After the download is complete, the direct installation will be OK (Note: Select All plugins at the time of installation, special PIP plugin required)

To check if the environment installation was successful, enter Python at the command line, as follows:

Step Two: Install the compiler IntelliJ idea and configure the environment

IntelliJ idea:https://www.jetbrains.com/idea/

After the download is complete, the installation steps are the same as for the other applications ha

Open and run idea, click File-setting-plugins, appear

Open File-project Structure-module, click the + sign, select New module

The third step, choose New Python project, confirm the SDK path, complete the environment to build, you can, show a code, haha

Some of the shortcut keys and uses of idea:

CTRL + N: quickly open a version (Navigate)
CTRL + SPACE: Auto-complete class name
ALT+F7: Quickly find where classes, methods, and variables are used
Ctrl+q: Quick view of the help document for a class or method (Quick documentation)
Ctrl+b: View the declaration of a class or variable, or jump directly with CTRL + Name
CTRL+12: Quickly view the file structure and press ENTER to enter
SHIFT+F6: Change the variable name in all occurrences of the file (refactor | Rename).
Ctrl+0: Overthrow a method
Ctrl+i: Implementing a Method
ctrl+shift+ Space: Auto-complete
ALT+F1: Quickly select the current editing element
Ctrl+alt+t: Select the snippet and surround it with Try-catch (code | Surround with) and choose Try/catch
ctrl+shift+ Space: Auto-complete after new
Ctrl+alt+b: Use or declaration of abstract methods
Ctrl+w: Extended selection, select when variable name and his call, declaration, contained block of code, etc.
When you need to cast a expression value to the required type the Smarttype code completion would help you. For example, type
ctrl+shift+ space: Assigns the value of an expression to the specified variable to view the result: String s = (
Ctrl+d: Copy paste current block or move forward
Alt+q: View the declaration of the current method (view | Context Info)
ALT + UP ARROW and ALT + DOWN ARROW: quick move between methods
Ctrl+shift+j: Merge two lines of behavior and remove unnecessary spaces
3. Install python plugin in IntelliJ
To create a new Java project, you will be prompted:
Double-click Shift: Global Search
Ctrl+shift+n: Enter file
Ctrl+e: Recent Files
Alt+home: Control bar

[Python interface automation] Learn from scratch Python automation (1): Environment construction

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.