[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

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

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