python数据库操作实例
python数据库类heroDB.py#!/usr/bin/env pythonimport MySQLdbDATABASE_NAME = 'hero'class HeroDB: # init class and create a database def __init__(self, name, conn, cur): self.name = name