Python MySQLdb 模块,version_info() 实例源码
我们从Python开源项目中,提取了以下1个代码示例,用于说明如何使用MySQLdb.version_info()。
def get_summary(cls):
"""
Return a diction of information about this database
backend.
"""
summary = {
"DB-API version": "2.0",
"Database SQL type": cls.__name__,
"Database SQL module": "MySQLdb",
"Database SQL module version": ".".join([str(v) for v in MySQLdb.version_info]),
"Database SQL module location": MySQLdb.__file__,
}
return summary