PYTHON MYSQL mysqldbエラーレベル、warningは表示されません


Here is a quick three line snippet that will suppress all of those annoying warning messages from MySQL when using MySQLdb:
view source print ? 1. from   warnings  import   filterwarnings 2. import   MySQLdb as Database 3. filterwarnings( 'ignore' , category  =   Database.Warning)
To re-enable the warnings later on:
view source print ? 1. from   warnings  import   resetwarnings 2. resetwarnings()
More about the warnings Python standard library: http://docs.python.org/library/warnings.html