Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

What are the more efficient techniques for using PyCharm?

2025-04-14 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

Shulou(Shulou.com)06/02 Report--

This article shows you what are the more efficient use of PyCharm skills, the content is concise and easy to understand, absolutely can make your eyes bright, through the detailed introduction of this article, I hope you can get something.

File differences, easy comparison

Beyond compare can definitely rank No. 1 among the necessary artifacts for program development.

Although it is easy to use, but this thing, charge ~

If it is a simple comparison of a single file, you can actually use the one that comes with PyCharm.

Click the source file, and then click View-> Compare With. -> Select the target file

Compared with the example, you can take a look at the following picture, UI is still quite good-looking.

Block editing in units

Let me give you a quick question, like the following code. What if you quickly delete the comments behind the code without affecting the code?

There are two ways I can think of, and if you have regular annotations like the one above, you can use regular matching + substitution to do so.

For this scenario, I thought that vim can be used to easily solve the problem. Vim supports block editing, and you can select areas in columns and then operate, which is a common uncomment operation in vim.

Also come back to PyCharm and you will find that it also supports block editing.

When you hold down alt (windows) or option (mac), and then use the mouse to select, you will find such an amazing thing.

Intelligent completion, ignoring case

Intelligent search completion is one of the most attractive features of IDE.

When your object starts with an uppercase letter, and you write code in lowercase letters, you can't find the function. You have to switch to uppercase and type it again.

How to avoid this awkward situation?

Just turn off case matching in the configuration.

The effect is as follows:

Protect your eyes, starting with PyCharm

I remember that when I first graduated from the first company, there was a girl who studied all the configurations in her computer that were useful for protecting her eyes.

Among them are the eye protection of the program, what word,excel, file manager, browser, can change the background color, all set up all over.

We have to say that a reasonable background color does play a certain role in protecting the eyes, but I think the most important thing is to have a reasonable and timely rest.

Here's how to set the background color of PyCharm to protect your eyes. The method is as follows:

Setting eye protection will lower the threshold of PyCharm, which requires you to choose between them.

For more information about increasing the PyCharm threshold, you can refer to my previous article:

Hand-in-hand teaches you to create a super-high value IDE

Debug the code of the remote server

In general, we develop and debug on a personal PC. If you encounter a problem, open the debugger of Pycharm and you will soon find out where the problem lies.

But sometimes, the running of the project code is dependent on the running environment and can only be run on the server where the relevant dependent components are deployed, which directly results in that we cannot debug locally.

As far as I know, there are two solutions for this particular scenario:

Pdb

Remote debugging

About pdb, I have written a special article about how to use it. You can check it here: code debugging method without graphical interface-pdb

Remote debugging allows us to debug remote server code with the graphical interface of Pycharm on PC. It is not much different from local debugging. How we debugged originally is still how to debug.

The difference is that local debugging does not require prior configuration, as long as your code is ready, you can start Debug at any time, while remote debugging requires a lot of pre-steps.

What are the more efficient use skills of PyCharm? have you learned any knowledge or skills? If you want to learn more skills or enrich your knowledge reserve, you are welcome to follow the industry information channel.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Development

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report