Some useful PyCharm features
Below you find a short list of useful features:
Autocompletion
While typing, PyCharm will try to autocomplete your code. This happens automatically as you type your class, function or method. To invoke the auto-completion manually, press the Ctrl+Space key.
If PyCharm can deduce what you’re trying to type it will complete your code. If multiple choices are available, it will present those choices to you.
![Autocompletion function in PyCharm.](../../_images/pycharm_autocompletion.png)
Autocompletion function in PyCharm.
Jump-to-definition
To efficiently jump to the definition of an object, just hover your cursor over the class, function or module to which you want to navigate and press Ctrl+[left-click]. PyCharm will then jump to the correct location. When you just press Ctrl, PyCharm will present a link if it knows where to jump to, and also the documentation of the class.
![Jump-to-definition function in PyCharm.](../../_images/pycharm_jumptodef.png)
Jump-to-definition function in PyCharm.
Debugging
To place a breakpoint, left click next to the line number. Now a red dot appears. When you now debug your program (by [right-click] somewhere in your code window and selecting ‘Debug [filename]’), it will stop right before executing this dot:
![Debugging in PyCharm: inspecting variables.](../../_images/pycharm_debugging.png)
Debugging in PyCharm: inspecting variables.
Once you are in a debugging location, you can go into an ipython console to inspect variables, execute and test code, etc:
![Debugging in PyCharm: ipython console.](../../_images/pycharm_debugging2.png)
Debugging in PyCharm: ipython console.
If you are familiar with Wing IDE and want to set up IPKISS for Wing, you can follow the guide to set up Wing IDE.
Configuring Python interpreter after project creation
We have configured the Python interpreter when we created a project in the previous step. But if that is not done for some reason (for example, in case you directly open a folder in PyCharm), we can also configure that from the project settings in PyCharm. In PyCharm menu bar, select
Then in the Settings dialog, select tab. Then, select the gear next to the interpreter list; and then click .![Specify project interpreter.](../../_images/pycharm_set_pythonpath_3.png)
Specify project interpreter.
In Add Local Python Interpreter dialog, under Conda Environment section, select
, modify the Interpreter path:For Windows,
{INSTALL_PATH}\python\envs\ipkiss3\python.exe
. By default, the python interpreter is found atC:\luceda\luceda_2024090\envs\ipkiss3
.For Linux: when miniconda is installed under your home folder under
miniconda
, then the Python executable will be at~/miniconda/envs/ipkiss3
. The last part of the path can vary depending on your version of IPKISS and how you named the environment during installation.
You may enable Make available to all projects. Then click
.