python常用的第三方库及代码_Python 常用的标准库以及第三方库有哪些

匿名用户

1级

2018-08-10 回答

参考:知乎

Python 常用的标准库以及第三方库

standard libs:

itertools

functools 学好python有必要掌握上面这两个库吧,

re 正则

subprocess 调用shell命令的神器

pdb 调试

traceback 调试

pprint 漂亮的输出

logging 日志

threading和multiprocessing 多线程

urllib/urllib2/httplib http库,httplib底层一点,推荐第三方的库requests

os/sys 系统,环境相关

Queue 队列

pickle/cPickle 序列化工具

hashlib md5, sha等hash算法

cvs

json/simplejson python的json库,据so上的讨论和benchmark,simplejson的性能要高于json

timeit 计算代码运行的时间等等

cProfile python性能测量模块

glob 类似与listfile,可以用来查找文件

atexit 有一个注册函数,可用于正好在脚本退出运行前执行一些代码

dis python 反汇编,当对某条语句不理解原理时,可以用dis.dis 函数来查看代码对应的python 解释器指令等等。

3th libs:

paramiko ssh python 库

selenium 浏览器自动化测试工具selenium的python 接口

lxml python 解析html,xml 的神器

mechanize Stateful programmatic web browsing

pycurl cURL library module for Python

Fabric Fabric is a Python (2.5 or higher) library and command-line tool for streamlining the use of SSH for application deployment or systems administration tasks.

xmltodict xml 转 dict,真心好用

urllib3 和 requests: 当然其实requests就够了 Requests: HTTP for Humans

flask web 微框架

ipdb 调试神器,同时推荐ipython!结合ipython使用

redis redis python接口

pymongo mongodbpython接口

PIL python图像处理

mako python模版引擎

numpy , scipy 科学计算

matplotlib 画图

scrapy 爬虫

django/tornado/web.py/web2py/uliweb/flask/twisted/bottle/cherrypy.等等 python web框架/服务器

sh 1.08 — sh v1.08 documentation 用来运行shell 模块的 极佳选择

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值