Installation and use of Python basic 1.2--pycharm

Source: Internet
Author: User
Tags python script

One. Windows installs Pycharm first.

Pycharm is a Python IDE with a complete set of tools to help users improve their efficiency when developing with the Python language, which provides a smart, configurable editor with coded completion, code snippets, support for code folding and split windows, It helps users to do coding more quickly and easily. is an essential tool for Python development.

1.windows under Installation Pycharm

pycharm:https://www.jetbrains.com/pycharm/download/#section =windos. Download Community Community Edition. Follow the prompts to proceed to the next step and complete the installation. two. Use of Pycharm1. Set pycharm python parser: File---settings The use of 2.pycharm starts with the creation of the project, after which the Python script is created under the project1> First create a project: File--newproject. Select the location to store the E:\PYTHON. Directory PYTHON I built it in advance .
2> Click Create, appear, select New Open in Windows, then click OK3> to finish creating the project4> Create the first Python script: In the new project Python, right-click---new---python File The 3.pycharm setting automatically adds the script start information. file--setting-- #/usr/bin/python#coding =utf-8# @Time: ${date} ${time}# @Auther: Liuzhenchuan# @File: ${name}.pyThree. Pycharm Common shortcut keys1 Ctrl +c: Do not need to select, directly copy a line of content to the specified line2 "ctrl+x: Cut3 ctrl+d: Quick copy of previous line4 "Ctrl + Z: fallback5 "Ctrl+shift+n: Quickly find a Python script file in the project6 "ctrl+alt+l: Code formatting7 "ctrl+alt+l: Code Auto Indent8 "Select the row, press the table key, select the line of code to walk backward a table distance. Move forward a table, select the line, Shift+table, is to go forward a table distance. 9 "Shift+enter: cursor in any position down automatically enter10 "Ctrl+alt+enter: cursor in any position upward auto-return11 "ALT+SHIFT+F10: You can select the Python file to runCTRL+SHIFT+F10: Running the current Python script12 Ctrl + left mouse button: Specify the function above the shortcut key, you will see the method used by this function13. Comment out multiple lines in Pycharm, and select the lines you want to comment on. Shortcut CTRL + Left slash to open commented out multiline, check the execution Ctrl + left slash at the time14 "Import OS module: When the red underline appears in the code, the code is wrong. If this is not the reason for the module, the mouse is underlined in red, alt+shift then press ALT + ENTER to select the module to add15 "Pycharm Shortcut Extension link address:1190000005776418 four. Pycharm Debug mode (Breakpoint Debug mode), also known as debug mode1. Set breakpoints: in front of the code, after the line number, the mouse click, you can set breakpoints. As follows:  2. Debug Breakpoint (SHFIT+F9): Click on the green beetle icon (it seems that the beetle has become a debug-specific icon), debugging breakpointswhen clicked, it runs to the first breakpoint. The variable information before the breakpoint is displayed. Click Step Over or press F8, and we continue down to the next breakpoint: . F7: Jumps to the next method, reads the statements in the method . F8: Read each statement and jump to the next breakpointFive. Run the Python program under Pycharm
1 "Hello World" printed in the new "Hello world.py" script


# @Time

# @File

' Hello World '//What you need to print out

2 "CTRL+SHIFT+F10: Run the program, the Pycharm interface appears below: Print out" Hello World "

                                                  

Installation and use of Python basic 1.2--pycharm

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.