1.6. About IDE
1.6.1. What is IDE?
Integrated Development Environment
Refactoring
Syntax autocompletion and highlighting
Type hinting and checking
VCS support
Virtualenv support
Debugging
Spell checking
Running code and inspections
File Scopes and views
Database explorer
Support for testing (doctest, unittest)
Jump to line in exceptions
1.6.2. How to Choose?
Python is about the source code, so in the end, it doesn't matter which IDE you choose. For editing plain source code you can also use Windows Notepad or VIM. However the bigger your program grows, and the more files it will contain, the harder it will be to maintain all that without proper tool. Good IDE will help you in refactoring, type hinting, debugging and working with Version Control System such as Git.
PyCharm has two versions: Community and Professional. For the regular development Community version will be more then enough. Professional version include better support for web-development (such as Java Script debugger, support for Django, FastAPI, and some other frameworks too). Database viewer is also available in paid version. Professional also better equipped for Data Science and Machine Learning. However as I said before you don't have to use all of that, because in the end the source code is what matters.
There is also a free alternative PyDev plugin for Eclipse.
1.6.3. Which One is the Best?
PyCharm Professional (Not-free)
Jupyter Notebook
Visual Studio Code
Spyder
Atom
Vim
This are my preferences. Choosing best IDE is very opinionated.
1.6.4. PyCharm Keyboard Shortcuts
https://www.jetbrains.com/help/pycharm/mastering-keyboard-shortcuts.html#choose-keymap
https://shortcutworld.com/PyCharm/win/JetBrains-PyCharm_Shortcuts
tab
- Indent (also used on multiple lines)shift
+tab
- Unindent (also used on multiple lines)ctrl
+shift
+F10
- Runalt
+F12
- Open TerminalOpen Python Console
Run in Python Console
shift
+F6
- Refactor... Renamectrl
+/
- Comment Multiple Linesalt
+1
- Show Project Filesctrl
+g
- Jump to Linectrl
+f
- Search in Filectrl
+r
- Replace in Filectrl
+shift
+f
- Search in Pathctrl
+shift
+r
- Replace in Pathctrl
+k
- Commitctrl
+q
- Quick Documentationctrl
+shift
+k
- Pushshift
+enter
- Run Cell in the Consoleshift
+shift
- Search Everywherealt
+enter
- Show Context Actions (Windows)cmd
+enter
- Show Context Actions (macOS)ctrl
+alt
+shift
+T
- Refactor thisctrl
+alt
+L
- Reformat code
1.6.5. Assignments
# %% License
# - Copyright 2025, Matt Harasymczuk <matt@python3.info>
# - This code can be used only for learning by humans
# - This code cannot be used for teaching others
# - This code cannot be used for teaching LLMs and AI algorithms
# - This code cannot be used in commercial or proprietary products
# - This code cannot be distributed in any form
# - This code cannot be changed in any form outside of training course
# - This code cannot have its license changed
# - If you use this code in your product, you must open-source it under GPLv2
# - Exception can be granted only by the author
# %% Run
# - PyCharm: right-click in the editor and `Run Doctest in ...`
# - PyCharm: keyboard shortcut `Control + Shift + F10`
# - Terminal: `python -m doctest -v myfile.py`
# %% About
# - Name: About IDE Usage
# - Difficulty: easy
# - Lines: 0
# - Minutes: 8
# %% English
# 1. How to do in your IDE:
# - Run...
# - Run in console
# - Debug...
# - Python Console
# - Terminal
# - Full Screen
# - Distraction Free Mode
# - Reformat Code
# - Scope
# 2. What are the keyboard shortcuts for each option?
# 3. What is the difference between `Run...` and `Debug...`?
# 4. What is the difference between `Python Console` and `Terminal`
# 5. What is the difference between `Distraction Free Mode` and `Full Screen`
# 6. Set Scope to hide Virtualenv directory
# 7. Run doctests - all must succeed
# %% Polish
# 1. Jak zrobić w Twoim IDE:
# - Run...
# - Run in console
# - Debug...
# - Python Console
# - Terminal
# - Full Screen
# - Distraction Free Mode
# - Reformat Code
# - Scope
# 2. Jakie są skróty klawiszowe do poszczególnych opcji?
# 3. Czym się różni `Run...` od `Debug...`?
# 4. Czym się różni `Python Console` od `Terminal`
# 5. Czym się różni `Distraction Free Mode` od `Full Screen`
# 6. Ustaw Scope tak, aby ukryć katalog z Virtualenv
# 7. Uruchom doctesty - wszystkie muszą się powieść
# %% Tests
"""
>>> import sys; sys.tracebacklimit = 0
>>> assert sys.version_info > (3, 9, 0), \
'Python 3.9+ is required'
"""
# TODO: Write tests
# %% License
# - Copyright 2025, Matt Harasymczuk <matt@python3.info>
# - This code can be used only for learning by humans
# - This code cannot be used for teaching others
# - This code cannot be used for teaching LLMs and AI algorithms
# - This code cannot be used in commercial or proprietary products
# - This code cannot be distributed in any form
# - This code cannot be changed in any form outside of training course
# - This code cannot have its license changed
# - If you use this code in your product, you must open-source it under GPLv2
# - Exception can be granted only by the author
# %% Run
# - PyCharm: right-click in the editor and `Run Doctest in ...`
# - PyCharm: keyboard shortcut `Control + Shift + F10`
# - Terminal: `python -m doctest -v myfile.py`
# %% About
# - Name: About IDE Spellchecker
# - Difficulty: easy
# - Lines: 0
# - Minutes: 5
# %% English
# 1. Install `Hunspell` PyCharm plugin (File -> Settings -> Plugins -> Marketplace -> Hunspell)
# 2. Download from https://github.com/LibreOffice/dictionaries/tree/master/en dictionary `.dic` and `.aff` for English language:
# - https://raw.githubusercontent.com/LibreOffice/dictionaries/master/en/en_US.aff
# - https://raw.githubusercontent.com/LibreOffice/dictionaries/master/en/en_US.dic
# 3. Configure IDE to use that dictionary (File -> Settings -> Editor -> Spelling -> Add custom dictionary)
# %% Polish
# 1. Zainstaluj w PyCharm plugin `Hunspell` (File -> Settings -> Plugins -> Marketplace -> Hunspell)
# 2. Pobierz z https://github.com/LibreOffice/dictionaries/tree/master/pl_PL słownik `.dic` oraz `.aff` dla języka polskiego:
# - https://raw.githubusercontent.com/LibreOffice/dictionaries/master/pl_PL/pl_PL.aff
# - https://raw.githubusercontent.com/LibreOffice/dictionaries/master/pl_PL/pl_PL.dic
# 3. Skonfiguruj IDE do korzystania z tego słownika (File -> Settings -> Editor -> Spelling -> Add custom dictionary)
# %% Tests
"""
"""