发布时间:2019-09-14 09:27:22编辑:auto阅读(2212)
从网上整理了一下Python忽略warning警告错误
方法一:直接运行脚本的时候加入参数
python -W ignore yourscript.py
方法二:代码中加入参数
import warnings
with warnings.catch_warnings():
warnings.filterwarnings("ignore",category=DeprecationWarning)
import pymssql #需忽略警告的模块
yourcode()
上一篇: Windows中python3.x用pi
下一篇: Elasticsearch 备份数据到
51096
50487
41100
37952
32417
29318
28192
23034
22998
21325
1354°
2047°
1707°
1636°
1929°
1711°
2386°
4020°
3906°
2790°