python 中使用with简化MySQL 和 Socket 的链接

数据库 : from pymysql import * class DB(object): def __init__(self): self.conn = connect(host='localhost', port=3306, database='python_test_1', user='root', password='mysql', charset='utf8')
相关文章
相关标签/搜索