Please enable JavaScript.
Coggle requires JavaScript to display documents.
Pycharm (professional) (Productive Coding (Live templates (Pycharm ->…
Pycharm (professional)
Setup
- install python if not already there
- download pycharm and install
on Linux we can run installer without sudo and choice not to register pycharm
-
when it create project, it also creates .idea hidden directory
-
-
Run a file by right clicking and choose "run", it will also create run configuration, see in RUN menu -> Edit config
Create a project from Folder: File -> Open -> <choose directory>. It will create new project in the same directory, so it will contain .idea subdirectory
UI and projects
-
-
docking of tools are on left and right side of screen. some tool windows at the bottom. we can move these tools to left/right/bottom
-
-
-
-
workingwindow
-
switch between tabs by keyboard
CTRL +TAB to open switcher
the TAB to go forward
and SHIFT + TAB to go backward
-
Components
-
-
tool windows: on left ,right, bottom
-
Running Code
Interpreter
-
-
Remote inter preter based on ssh, vegrant or docker or conda, virtualenv
-
Config
RUN -> edit config
- symbol at top left, there are template run configs
-
-
-
Python console Env:
Top-level Pycharm -> preference -> Under Build, Exce... -> Console -> Python Console
Productive Coding
-
Create function after using:
ALT +ENTER (Quick Fix, we can do more)
-
-
-
-
-
-
-
-
-
Language injection
ALT+ENTER
To edit python string in different language with the help of Pycharm features
Navigation
-
-
-
-
-
-
-
-
Navigate -> symbol search : to search by symbol
we can search with camel case. e.g has_property by hp
-
Debugging
-
-
-
-
we can choose any stack frame and if we use evaluation console, we will have access to that frame variables
-
Unit Test
Right click in function -> Go To -> Test
then create test in pop up
then check the function and code intention will create a test file and run config
In the test run tool, we can setup the delay in settings
if we install code coverage module, we can run code coverage by clicking button next to run-button
in the testcase file, if we right click on particular test we can run that particulate test
-
-
Settings
-
if any setting have Icon followed by setting name it means it is project specific setting, otherwise global setting
-
-
Important
-
-
-
-
we cann add all open file tabs to favorite in one shot by right clicking on any file tab and "Add all to favorite"
-
-