In my python script I would like to trap a \"Data truncated for column \'xxx\'\" warning durnig my query using MySql.
I saw some posts suggesting the code below, but
Have you tried using MySQL's SHOW WARNINGS command?