PyCharm
PyCharm is an integrated development tool developed by the Nordic JetBrains company.
1. Download and install
1.1 Download
The following is the detailed process of download and installation:
Open the official website , the following interface appears:
Scroll down: find PyCharm:
Save:
I saved it here:
1.2 Installation
Next, double-click to open the exe file, click "Yes" in the pop-up dialog box, and then the following figure appears:
click next
Check the options inside, except for the last one, check everything else.
In the pop-up window, click install:
Then there is a crazy installation:
after the installation, you will be prompted to restart the computer, you can choose to restart it for a while, and then restart after you save all the important files. Since I am writing this blog, I need to save the blog before restarting.
1.3 Trial run
Now that the installation is complete, you can double-click the icon on the desktop to open Pycharm:
choose to create a new project
in the interface that appears, select the local environment in the interface that appears, and add the locally installed interpreter, which is Python.exe
Find the local interpreter:
click ok to end.
Go back to the original interface, check the option to create a sample, every time you create a new project, a sample file will be automatically generated, and you can write your own content by deleting the contents:
After clicking Creat, you need to wait for a few seconds, and then the following interface appears:
Just click close.
As above, you can write your own code after deleting the contents and then run it. The result came, and it proved that it was installed.
You can click File>Save As to save the file every time you finish writing the code. Next time you can use the open option to open the saved file.
Well, that's it for the download and installation of PyCharm.
2 Simple configuration of PyCharm
Let's open PyCharm first, right-click the work folder>New>Director in the left menu bar, create a new folder, name it "basic", use the same operation, and create a new folder named "Day02" in the basic folder.
Let's create a new Python file in Day02 and name it "PyCharm Configuration".
2.1 Modification of the theme
Click: File>Settings>
Select Apearance&Behavior in the pop-up window, and find the Theme option on the right, where you can modify the theme.
Click "Apply" after editing.
2.2 Modify font
Select Editor>font in the left menu bar to modify the font.
You can modify the font, size, line spacing, etc. in this interface.
Generally, a font size of 22 is sufficient. Click OK to confirm.
2.3 Turn off the software update function
During the programming process, a reminder to update the software will often pop up, which will affect the network speed and programming. You can turn off this function.
Still in File>Settings>Apearance&Behaviors>, select System Settings>updates, and remove the check mark in front of automatic update, as shown in the figure.
Click OK to save.
2.4 Set shortcut keys
Click keymap in the above interface, as shown in the figure: After
setting, select OK
2.5 Automatic package guide settings
When we are writing code, the automatic package guide function will provide a lot of convenience and can save us time. For example, if we enter im, import will be displayed later. It can be set here:
check it and confirm.
2.6 Automatically open the last project setting
Sometimes the project we edited last time needs to be improved this time, and the last project can appear when the software is opened. Or turn off the function when it is not needed. Set here:
set to click OK to confirm.
2.7 Several ways to run the project
The first type: After writing the code, right-click in the blank space, as shown in the figure below, and select run "file name".
The second: This method must pay attention to first choose the project you want to run. Because what you see is not necessarily the same as the file item you want to run.
The third type: shortcut key "Ctrl+shift+F10". (This method I opened the calculator, dizzy)
2.8 Add header file
Click OK to confirm. Create a new project and the title header appears.
The content of the header header is written as follows and can be copied.
# @Time : ${DATE} ${TIME}
# @Author : Jerry
# @File : ${NAME}.py
# @Software: ${PRODUCT_NAME}
2.8 Encoding settings
After setting, click OK to confirm.