Python忽略warning警告错误
从网上整理了一下Python忽略warning警告错误
方法一:直接运行脚本的时候加入参数
python -W ignore yourscript.py
方法二:代码中加入参数
import warningswith warnings.catch_warnings(): warnings.filterwarnings("ignore",category=DeprecationWarning) import pymssql #需忽略警告的模块yourcode()
声明:本站所有文章资源内容,如无特殊说明或标注,均为采集网络资源。如若本站内容侵犯了原著者的合法权益,可联系本站删除。