Python(五)
source link: http://antkillerfarm.github.io/language/2020/12/24/python_5.html
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
Python
python调试
import pdb
然后在需要断点的地方:
pdb.set_trace()
然后直接运行脚本即可,其他命令和gdb十分相似。
pdb和gdb的差异主要在于:
1.pdb需要修改代码,而gdb不需要。
2.可以直接运行脚本进入pdb模式,而gdb需要先进入gdb环境,然后才可以运行程序。显然pdb的灵活性比较高。
https://blog.jamespan.me/2016/06/09/remote-debug-your-python-code
远程调试你的Python代码
https://www.ibm.com/developerworks/cn/linux/l-cn-pythondebugger/index.html
Python代码调试技巧
https://mp.weixin.qq.com/s/4pxGrn9jgp8So8JsONC-3A
别再用print调试代码了(PySnooper)
https://mp.weixin.qq.com/s/JNGtOtRW3YsLti9gVYzLcg
清华校友打造Python调试神器(Cyberbrain)
https://mp.weixin.qq.com/s/weEZEr4g8pI11Gijc-St0Q
DeBug Python代码全靠print函数?换用这个一天2K+Star的工具吧
https://mp.weixin.qq.com/s/bNW1FbUG5LNUiRmmzirgCg
别再用Print调试Python了!(Icecream)
https://mp.weixin.qq.com/s/WqDWksBDBa07s84v6R1tlA
Python里三个最高逼格的调试神器
https://mp.weixin.qq.com/s/dlMqyVy92S_dFaBAuV1RhA
Python和C/C++拓展程序的性能优化
https://mp.weixin.qq.com/s/Q5P037abid03H4-ypWa7qg
用了三年的pdb,没想到还能这么调试
SCons
blade的底层用到了SCons。后者是一个python语言写的构建工具,可用于多种编程语言程序的构建。
http://www.scons.org/
sudo apt install scons
和make类似,可以用如下方式并行编译:
scons -j 4
clean:
scons -c
使用示例:
https://github.com/antkillerfarm/antkillerfarm_crazy/tree/master/cpp/scons
项目的工程文件为SConstruct。
从个人角度,我认为一个好的构建工具需要具备以下特点:
-
常见任务书写简单。换句话说就是预先内置好了大量规则。make在这一点上做的不太好,手工任务太多,以致出现了Autotools和CMake这样的辅助工具。
-
特殊任务扩展简单。make系列工具的DSL都不是完备的语言,这一点是比不了python的。
因此,我是比较看好SCons的。
上述特点在Java的构建工具上也得到了体现,ANT书写麻烦,所以被Maven取代,而Maven扩展不便,又被Gradle挑战。
https://www.ibm.com/developerworks/cn/linux/l-cn-scons/
使用SCons轻松建造程序
https://mp.weixin.qq.com/s/3QS_9U_X2bELwLzzVfaBOQ
SCons-Python给C++做的烤饼,香!
Tkinter
Tkinter简明教程
2014年度辛星Tkinter教程第二版
Python GUI Programming Cookbook
https://mp.weixin.qq.com/s/RdnAQPAn9E8qDvtnCEgcKw
Tkinter可视化窗口
https://www.zhihu.com/question/32703639
为什么很多Python开发者写GUI不用Tkinter,而要选择PyQt和wxPython或其他?
Dear PyGui
Dear PyGui是一个轻量级的GUI框架,可以利用GPU进行渲染。
https://github.com/hoffstadt/DearPyGui
https://mp.weixin.qq.com/s/t1DT7jyKj1moU1qnrn5GiQ
好看又好用的GUI,你需要这七个Python必备库
Streamlit
https://mp.weixin.qq.com/s/sZvawmQ1KH3b_hozAbeX9w
如何用简单的Python为数据科学家编写Web应用程序?
https://mp.weixin.qq.com/s/gVIVDR1pXdDArrZO56B86w
如何用纯Python写Web应用?
https://mp.weixin.qq.com/s/TV1MJfaOq27y2DVCGMuqhA
用Pandas和Streamlit对时间序列数据集进行可视化过滤
python有个叫做attr
的包,还有一个叫做attrs
的包,然而import attr
实际上用的是attrs
。
https://mp.weixin.qq.com/s/PC0bGKzIC_GXLOcVqDAZmA
Python学习思维导图
https://mp.weixin.qq.com/s/Hy1ZPFSRfVIMYEYFCOcKPQ
1000+常用Python库一览
https://mp.weixin.qq.com/s/_OmRvwFmvuuOpBf7DQG8IA
Python30个编程技巧
https://mp.weixin.qq.com/s/jG9RYSn5Gia7E9GyYx1IqQ
30段极简Python代码
https://mp.weixin.qq.com/s/Y3ZV3phzkPGxHIvoT8Ez7Q
53个Python经典面试题详解
https://github.com/leisurelicht/wtfpython-cn
《What the f*ck Python!》中文版
https://mp.weixin.qq.com/s/FbMvWgVf1rYtWH4cwYarIg
140种Python标准库、第三方库和外部工具都有了
https://mp.weixin.qq.com/s/O5okcuVKuf339BZzhmxiew
13个Python GUI库
https://mp.weixin.qq.com/s/hIMwss4h5k10oLanCYYS1g
49个Python学习资源
https://mp.weixin.qq.com/s/2tS7g4QxZ0r3wEt2nsSvLg
这个库堪称Python编程的瑞士军刀!(funcy)
https://mp.weixin.qq.com/s/cgSVy0zGPcKREo62tbiYnA
7个学习Python编程的最佳开源库
https://mp.weixin.qq.com/s/06-iOG5TkRkHb4RZl1bXNQ
史上最全Python迭代器与生成器
https://mp.weixin.qq.com/s/lv_sjvXx8vWf6TsVoYoxFw
Python处理文件系统的10种方法
https://mp.weixin.qq.com/s/KCiR6ZE1EpYVfySaCG097A
上半年最常见的Python面试题
https://mp.weixin.qq.com/s/0dw2LHsIKFv8B_JaIMoekg
python字符编码处理总结
https://mp.weixin.qq.com/s/fTs_r7DLbLWoos4uRM3KYA
10个Python常见面试题,这些弄不明白不要说学过Python!
https://mp.weixin.qq.com/s/kt5isheTBnpwKUhJAuXnYw
视频剪辑什么鬼?Python带你高效创作短视频
https://mp.weixin.qq.com/s/5YWAgp8LKi5q_NDrNUtyGQ
在GitHub上收获6519颗Star的Python面试题资料
https://mp.weixin.qq.com/s/toh59s2-UlqiZfkE5ThxZw
谈一谈python中的魔法变量*args和**kwargs
https://mp.weixin.qq.com/s/s7PFVE_wcAMZaRUds2MJDQ
Python中的*args和**kwargs是什么?该如何使用?
https://mp.weixin.qq.com/s/8y7IIQWxXx3bCD8cK8Z3XQ
这17个骚操作你都Ok吗
https://mp.weixin.qq.com/s/rE5OEFwwFxJNb_Omwmqvzw
符合语言习惯的Python优雅编程技巧
https://blog.csdn.net/longerzone/article/details/17889969
Python下调用Linux的Shell命令
https://mp.weixin.qq.com/s/zLTEzMczlrHrX9by0ccp5w
史上最全Python Re模块讲解
https://mp.weixin.qq.com/s/GEn6rmbSfob5W7syf9cnJw
Python实现Word文档操作
https://mp.weixin.qq.com/s/QatY21HxcYHqV2WZ8gc0_g
Python中的异常处理
https://mp.weixin.qq.com/s/i_xLlknJbap3Z9ci0gwuNQ
如何用Python编写一个Lisp解释器
https://mp.weixin.qq.com/s/mP7M4z2mzj_1KPrEx0oqwg
迭代列表不要For循环,这是Python列表推导式最基本的概念
https://mp.weixin.qq.com/s/mcHYTjIDnVBA58-1h8BLdA
手把手教学:提取PDF各种表格文本数据
https://mp.weixin.qq.com/s/bV7g9ugGmFjojGDMIc_kpQ
Python中的元编程:一个关于修饰器和元类的简单教程
https://mp.weixin.qq.com/s/WZDuxH-SYZlD6DED539J6Q
从Python代码到APP,你只需要一个小工具
https://mp.weixin.qq.com/s/hplHCF1e4arlXCRAel0mcw
Python十大装腔语法
https://mp.weixin.qq.com/s/Oo-U4Bq7g1wmQgXJ7Y-rjw
万字长文详解如何用Python玩转OpenGL
https://mp.weixin.qq.com/s/ctlb3nwCEu3qP__xeTUlQQ
GitHub上有个沙雕开发者,做了款斗图工具后火了…
https://mp.weixin.qq.com/s/G5qx3-1Wq4gcRSuRfrczuw
Python趣味打怪:60秒学会一个例子,147段简单代码助你从入门到大师
https://mp.weixin.qq.com/s/zIHJsyankFEf_ig4Xnb0Uw
工具推荐!我是如何使用Python脚本分析CPU使用情况的?
https://mp.weixin.qq.com/s/v-N5jUTVFBb-wV0a_RAg5A
Python实现代码雨效果
https://mp.weixin.qq.com/s/0wJRlGS2QXpEL2XaU_Ke-g
Python实现烟花特效
https://mp.weixin.qq.com/s/8Fgzb8JiAoNSJqUanSi85Q
鼠年做只奔跑的猫呗,卖萌式监控系统资源~(QSystemTrayIcon)
https://mp.weixin.qq.com/s/2RRJDStTL7l2Ra3SnNEEYg
发布自己的python库到pypi
https://mp.weixin.qq.com/s/PBaDdLcYxDso2V4aZcFXpA
盘一盘Python错误类型
https://mp.weixin.qq.com/s/8uxc2t53N_j_mRPYbiG0sA
5个案例让Python输出漂亮的命令行表格!
https://mp.weixin.qq.com/s/3pGw9QdAZVE3OKZ-zGyb4g
使用Python远程登陆服务器的最佳实践
https://mp.weixin.qq.com/s/Bllw4rSkxd378LLUCh6oJA
Python炫技操作:合并字典的七种方法
https://mp.weixin.qq.com/s/KrdXyYMtyElUGuPH5eNYvg
Python的深浅拷贝讲解
https://mp.weixin.qq.com/s/DMK3gwMKbpsfOrWMxjb5lg
不到20行代码,用Python做一个智能聊天机器人
https://mp.weixin.qq.com/s/wIXCIMzZmh75SV-qJIKbCw
Python程序员最常犯的10个错误,你中招了吗?
https://mp.weixin.qq.com/s/W1j4G_QQqlzDYru231dZFA
Python:编写条件分支代码的技巧
https://mp.weixin.qq.com/s/ST7TQ5Wkn_owv5bpTiTKVA
2018年最好用的5个python网站开发框架
https://mp.weixin.qq.com/s/dmJI2GlzgUJgYllfVOPt4g
两句话轻松掌握Python最难知识点
https://mp.weixin.qq.com/s/PkzD1ig_D5AIUTkO5zH8pQ
Python字节码介绍
https://mp.weixin.qq.com/s/-erFsz8NvLZ5mOIXyDosFg
使用PyInstaller将python转成可执行文件exe笔记
https://mp.weixin.qq.com/s/EZh5PAUgXkIDzGbim6wqLQ
用Python带你看白雪飘扬~
https://mp.weixin.qq.com/s/SUyRNz_M7B6bcdV7-YxlZQ
Python制作一款简易音乐播放器
https://mp.weixin.qq.com/s/d2_MTvfbOFZmppej5UOwUw
关于使用Python析构函数的正确姿势
https://mp.weixin.qq.com/s/_PtdgGElw0mvr_rRm5xrCg
Python性能优化的20条招数
https://mp.weixin.qq.com/s/0Rpbuo7LCRo1SnbE8NcH4Q
快速学习Python的全套14张思维导图
https://mp.weixin.qq.com/s/Cujl2nxITCuZL7B72uKVrQ
为什么Python这么慢?
https://mp.weixin.qq.com/s/a3YTmQMfpnviHnidXrhYtg
这17个骚操作你都Ok吗
https://zhuanlan.zhihu.com/p/41293278
把python翻译成C++
https://mp.weixin.qq.com/s/XV4LOBM1pO0N8oShZl7MzQ
手把手教你用Python设计一个命令行界面
https://mp.weixin.qq.com/s/b19SLduKoiOIeE5CA3ZOjg
Python标准库之LRU缓存实现学习
https://mp.weixin.qq.com/s/zABXQksUX6le8zWJeWUQXw
Python的__name__
变量,到底是个什么东西?
https://mp.weixin.qq.com/s/FtlAkInyXgvUxDnSCikTIw
全面深入理解Python面向对象编程
https://blog.csdn.net/lys_828/article/details/106489371
字符串模糊匹配及在实战中的应用(FuzzyWuzzy库)
https://mp.weixin.qq.com/s/Ln5EPqbdNjy3HrVM7Wwe2g
Heartrate:一个牛逼的工具,Python执行实时可视化
https://mp.weixin.qq.com/s/J8IHOdUevyn9YS09D8Ou-g
聊聊Python发送邮件的几种方式
https://mp.weixin.qq.com/s/L0FoYh1npy-3rwRQWcj71g
五大自动化测试的Python框架
https://mp.weixin.qq.com/s/Oq316PWN10FBWzv-X26pAg
高性能Python CPU Memery分析器
https://mp.weixin.qq.com/s/wr18ylCJyJOX83BhbvGXng
13个Python开发者必知的Python GUI库
https://mp.weixin.qq.com/s/S_mIspLOrmj8ny0VHP52ZA
Python高级技巧:lazy property
https://mp.weixin.qq.com/s/QWH9qhKzECX-1rqDLfZyhw
如何加速Python代码?
https://mp.weixin.qq.com/s/OT9yRMFsNowXBbwKqmzP-Q
一起来尝试借助哈密顿环自动玩贪吃蛇小游戏呀~
哈密顿图:由指定的起点前往指定的终点,途中经过所有其他节点且只经过一次。
https://segmentfault.com/a/1190000000414339
一行Python代码实现并行
Recommend
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK