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