import web
db = web.database(
dbn="mysql",
db=sae.const.MYSQL_DB,
user=sae.const.MYSQL_USER,
pw=sae.const.MYSQL_PASS,
host=sae.const.MYSQL_HOST,
port=int(sae.const.MYSQL_PORT),
)
#sae.const 模块为新浪微博应用体系提供的,使用时替换为相应值即可
#注意port的值必须为int类型,不可以为字符串