@ the Author: Runsen

I decided to put Python articles I wrote last year into a column, delete the garbage, and organize multiple blog posts into one.

Pycharm is one of the most popular Python development tools available, so I’m going to try to include everything I use

1. Set up the Python interpreter

The first step in any project is to set up the Python interpreter, which is python.exe

Go to File->Setting->Projec: XXX to find Project Interpreter. Then modify it to the Python interpreter you need. It is important to note that when selecting a Python interpreter, always select python.exe, not the Python installation folder.

Python. exe with Anacodna, remote python.exe, and python.exe downloaded directly

Local and Anaconda are not said, too damn simple, let’s talk about how to remote virtual machine, Docker connection, maybe xiaobai don’t know what is Docker, we will talk about later

1.1 Remote Configuration

Pycharm sets remote Settings when using a Django project,

Actually very simple, I just take my Centos7 IP is 192.168.9290

Password of the user name

And then there are two things in the configuration

The presence of Deployment indicates that it is OK.

2, adjust font and size

2.1 Adjust the editor font and its size

All of the locations are in Settings, so where do I look

2.2 Adjust the font and size of the console

3. Set the encoding

4. Modify the background color of the file

5. Set Git and Github

5.1 configure git

The location of the Git

5.2 configuration making

You can upload your code to Github now

Last time the code went to Github Commit

5.3 Downloading the Warehouse Content

6. Information is added by default when you create a. Py file

This is last year’s blog

For PyCharm, we can use the template to add the comments and author time each time we create a Python file, so that it is easier to add them by default after each new file. 1. Click on file in the upper right corner of PyCharm and click Settings:

2. Next, find the place as shown below:

${<variable_name>}; ${<variable_name>};

The available predefined file template variables are:

${PROJECT_NAME} – The name of the current project.

${NAME} – The NAME of the new file specified in the New File dialog box during file creation.

${USER} – The login name of the current USER.

${DATE} – The current system DATE.

${TIME} – Indicates the current system TIME.

${YEAR} – This YEAR.

${MONTH} – The current MONTH.

${DAY} – The DAY of the month.

${HOUR} – Current HOUR.

${MINUTE} – The current MINUTE.

${PRODUCT_NAME} – The name of the IDE in which files will be created.

${MONTH_NAME_SHORT} – The first three letters of the month name. Examples: January, February, etc

${MONTH_NAME_FULL} – Full name of a month. Examples: January, February, etc

7. Restore the code

If you delete code by mistake, don’t be afraid

8. Line wrap

Write a lot of code, can Soft–Wrap

9, Reformat Code

Write code is not pretty enough, Reformat directly

10. Connect to the database

Host: indicates the remote IP address. If you want to connect to the local MySQL Database, write to localhost. Database: indicates the name of the Database

Note: If you need to Download the driver for the first time, click Download on the lower left corner

After downloading, click test Connection. Successful Details is displayed

11, the Debug

The previous information is displayed

12. PyCharm

Familiarize yourself with the keyboard shortcuts of each editor to greatly increase your productivity.

conclusion

Here’s how Pycharm works on a daily basis, but the key is practice.

Let’s get started with Python programming

GitHub, portal ~, GitHub, portal ~, GitHub, Portal ~