[Python] Python忽略warning警告错误

Python忽略warning警告错误
 
1)代码中警告
import warnings
warnings.filterwarnings("ignore")

 

2)忽略命令行下警告错误的输出:
python -W ignore yourscript.py

 

本博客地址: wukong1688

本文原文地址:https://www.cnblogs.com/wukong1688/p/10941744.html

转载请著名出处!谢谢~~

 
 
posted @ 2019-05-29 09:12  wukong1688  阅读(3897)  评论(0编辑  收藏  举报