I wonder if I can use the context manager with with the Connection object, and write code like this:
with
Connection
with MySQLdb.connect(...) as c
MySQLdb does not support the context manager protocol. Roll your own, or use oursql instead.