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