E&K Labs
Published in

E&K Labs

Features of PyCharm used for Python study and research

When I first studied programming, I heard that using an IDE is bad for beginners because it makes them rely on autocomplete. However, recently, when I searched related articles to write this article, I saw that IDE recommendations came up as related search terms, and I felt that these days it is different.

Although it is different from the original intention of writing this article, I would like to introduce a function that I use to study and research Python.

Conditional Debug

Setting breakpoints and debugging is actually a basic debugging method that anyone can do.

However, in order to debug when a problem occurs in a specific environment, it is necessary to create a situation in which a specific situation occurs and to stop at a breakpoint at a specific location only when the corresponding contextual situation occurs.

The function you use at this time is conditional debugging, and you can use it like this.

Go to declaration (Ctrl + B/Cmd + B)

Often, to understand the principle of a specific class or operator, it is necessary to go into the declaration of the corresponding function and understand how it works. You can find out what order a specific function operates in, and what class it inherits from.

Personally, I prefer to find and analyze the code as I have a lot of experience not finding the functions I need in the official reference documentation, which helps in quick and efficient analysis.

There is also a shortcut, but I use this method. (Cmd + mouse click)

It is good to use the Structure tool window together.
The built-in library is also debuggable.

Virtual Environment Management

Pycharm can easily manage virtual environments using GUI.
You can easily set up and change the virtual environment in the Project/Python Interpreter menu.

In addition, it is possible to identify additional libraries currently installed in the virtual environment, and you can change the version or add or remove them.

Python interpreter

This is a function that is often used in research as well as in the development process.

In the context of developing applications such as Django, it is often used in the development process because it allows you to quickly test only specific functions while receiving IDE support such as auto-completion.

Like VS Code, a terminal is also provided, but I think that the built-in instant interpreter is one of the greatest strengths of PyCharm.

Variables created in this way can also be checked.

Wrap up

The IDE is a huge tool, and in addition to the features described in this article, it includes a variety of tools to help with development.

Enjoy hacking python.



Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store