当前位置:网站首页>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 ~
边栏推荐
- 【TcaplusDB知识库】TcaplusDB单据受理-创建业务介绍
- How to load the contour CAD drawing of the engineering coordinate system obtained by the designer into the new earth
- 【leetcode】112. Path sum - 113 Path sum II
- IDEA本地代理后,无法下载插件
- Keil4 opens the single-chip microcomputer project to a blank, and the problem of 100% program blocking of cpu4 is solved
- Is it safe to open an account for mobile stock registration? Is there any risk?
- Audio and video learning (III) -- SIP protocol
- Particle filter PF - 3D CV target tracking with uniform motion (particle filter vs extended Kalman filter)
- 【leetcode】701. Insert operation in binary search tree
- Database - integrity constraints
猜你喜欢
2Gcsv文件打不开怎么处理,使用byzer工具
Evaluation - TOPSIS
【TcaplusDB知识库】TcaplusDB系统用户组介绍
Ansible自动化的运用
Particle filter PF -- Application in maneuvering target tracking (particle filter vs extended Kalman filter)
nanoPi Duo2连接wifi
[graduation season · advanced technology Er] what is a wechat applet, which will help you open the door of the applet
【SNMP】snmp trap 介绍、安装、命令|Trap的发送与接收代码实现
反射修改final
【文件】VFS四大struct:file、dentry、inode、super_block 是什么?区别?关系?--编辑中
随机推荐
【leetcode】48.旋转图像
【ceph】CephFS 内部实现(三):快照
手机上怎么开户?在线开户安全么?
【ceph】cephfs caps简介
在哪个平台买股票开户安全?求指导
On which platform is it safe to buy shares and open an account? Ask for guidance
AUTO sharding policy will apply DATA sharding policy as it failed to apply FILE sharding policy
Use of abortcontroller
功能:crypto-js加密解密
【leetcode】331. 验证二叉树的前序序列化
【ceph】CEPHFS 内部实现(一):概念篇--未消化
JS events
音视频学习(三)——sip协议
Unity unitywebrequest download package
One click analysis hardware /io/ national network performance script (strong push)
feil_ The working directory on the left of uvission4 disappears
Is it safe to open a new bond registration account? Is there any risk?
通过券商经理的开户链接开股票账户安全吗?还是去证券公司开户安全?
2022北京石景山区专精特新中小企业申报流程,补贴10-20万
MySQL数据库基本SQL语句教程之高级操作