当前位置:网站首页>Super double efficiency! Pycharm ten tips
Super double efficiency! Pycharm ten tips
2022-06-26 15:39:00 【Panda aiqia rice】
Preface
Big guys, good duck ~ I am a panda. Today I want to show you python Ten tips for ~
Don't talk much Let's start

do person : Liu shanguo
Diffuse draw : Cat Xiaoguang
Come on Source : Muggle programming (easypython)
0. PyCharm Common shortcut key


1. Check the source code of the library Click here to get the information

Listen to people often , Look at the source code . Source code can not only help us understand the operation mechanism , You can also learn good library or framework best practices .
When calling the library , You can click... Almost anywhere you are curious Command+B, It is very convenient to jump to the class in the source code , Method , function , Definition of variables .
2. Let your code PEP8 Click here to get the information

Write Python Code , You will strictly abide by pep8 Norm ? Still have to abide by , Otherwise, the code will be sent to github Or to know that it's not good to be hated . But if you rely on the naked eye to check and pay attention , Too tired , by PyCharm Just do it ,Command+Option+L, Onekey pep8 Walk up .
3. Novices no longer worry about installing Libraries Click here to get the information

If you're new , You may have trouble installing the library , stay PyCharm You can use the familiar graphical interface to install the library , You don't have to get stuck in a bunch of command lines .
4. Find files 、 class 、 Method Click here to get the information
When we need to find a filename in the project , Input Command + Shift + O, Then enter the name of the file you want to find . If you don't remember the full name , Just type the first letter ,Pycharm It will remind you . For example, I want to find a name test_errors.py The file of , So just type tee You can find it . Or search test_errors_1.py So just type tee1 You can find .
5. Quick selection of code blocks Click here to get the information
How can you quickly comment on a paragraph Python Code block ? It's not going to be line by line # Well ……
When you need to select a function , Just put the cursor at the front , And then click Command + Option + Shift + [ , You can choose the current code block , Use Command + / notes .
6. Insert common code quickly (https://jq.qq.com/?_wv=1027&k=2OpBRkgk)

Sometimes you need to enter a long code , such as if name == ‘main’: , In this case, manual input is better than direct input Command + J , You can insert common code directly .
7. function / Debugging code Click here to get the information
Run code 、 Debugging code should be the most commonly used shortcut for most people .
Mac:
Control + r: Run the current code directly
Control + d: With Debug( debugging ) Mode run code
Windows/Linux:
Shift + F10: Run the current code directly
Shift + F9: With Debug( debugging ) Mode run code
8. Indent your code block
When writing the front page , Always change the indent of a large piece of code , You can use it first Shift + Up and down keys To select the code block you want to indent , And then use Tab You can indent .
9. an / Shrink code
When the project is written to a certain scale , It's hard to avoid / There will be many functions , We can use it at this time Command + Shift + - Symbol To shrink the code , This is mainly for convenience .
10. Show multiple pages

When your company is not willing to configure for you 2 When there's a screen , You can still use PyCharm View multiple files in one screen . Mouse over the filename of the current navigation , And then right-click Split Vertically perhaps Split Horizontally That's all right. .
So this is the end of today's sharing At the end of the article, you can get free materials on demand
I'm a panda , See you in the next article ~
边栏推荐
- 【leetcode】701. Insert operation in binary search tree
- 【小程序实战系列】小程序框架 页面注册 生命周期 介绍
- 评价——TOPSIS
- 【问题解决】新版webots纹理等资源文件加载/下载时间过长
- How to handle 2gcsv files that cannot be opened? Use byzer
- 音视频学习(三)——sip协议
- JS handwritten bind, apply, call
- 数据库-视图
- 【leetcode】112. Path sum - 113 Path sum II
- [tcapulusdb knowledge base] tcapulusdb doc acceptance - transaction execution introduction
猜你喜欢

# 粒子滤波 PF——三维匀速运动CV目标跟踪(粒子滤波VS扩展卡尔曼滤波)

【微信小程序】事件绑定,你搞懂了吗?

【TcaplusDB知识库】TcaplusDB运维单据介绍
![[CEPH] Introduction to cephfs caps](/img/41/7d59ecbc1129503c8858dc0304a3f9.png)
[CEPH] Introduction to cephfs caps
![[tcapulusdb knowledge base] tcapulusdb OMS business personnel permission introduction](/img/7b/8c4f1549054ee8c0184495d9e8e378.png)
[tcapulusdb knowledge base] tcapulusdb OMS business personnel permission introduction

How to load the contour CAD drawing of the engineering coordinate system obtained by the designer into the new earth

【问题解决】新版webots纹理等资源文件加载/下载时间过长

Particle filter PF - 3D CV target tracking with uniform motion (particle filter vs extended Kalman filter)

PCIe Capabilities List

Using restcloud ETL shell component to schedule dataX offline tasks
随机推荐
粒子滤波 PF——在机动目标跟踪中的应用(粒子滤波VS扩展卡尔曼滤波)
nanoPi Duo2连接wifi
【leetcode】112. Path sum - 113 Path sum II
【leetcode】701. 二叉搜索树中的插入操作
JS simple deepcopy (Introduction recursion)
在哪个平台买股票开户安全?求指导
Summary of students' learning career (2022)
Ansible自动化的运用
【TcaplusDB知识库】TcaplusDB单据受理-事务执行介绍
刷题笔记(十九)--二叉树:二叉搜索树的修改与构造
学习内存屏障
English语法_形容词/副词3级 - 原级句型
【TcaplusDB知识库】TcaplusDB数据构造介绍
[tcapulusdb knowledge base] tcapulusdb OMS business personnel permission introduction
【ceph】CEPHFS 内部实现(一):概念篇--未消化
Function: crypto JS encryption and decryption
AUTO sharding policy will apply DATA sharding policy as it failed to apply FILE sharding policy
为什么图像分割任务中经常用到编码器和解码器结构?
JS events
Database - sequence