摘要: class Employee(db.Model, BaseDbModel): id = db.Column(db.Integer, autoincrement=True, primary_key=True) name = db.Column(db.String(30), nullable=False 阅读全文
posted @ 2019-10-26 08:22 seawind2012 阅读(329) 评论(0) 推荐(0) 编辑
摘要: # _*_ coding: utf-8 _*_ 导入 pygame 作为 游戏 导入 time 作为 时间 从 pygame.locals 导入 * 从 sys 导入 exit # 初始化pygame,为使用硬件做准备 游戏.init() # 创建一个窗口 窗口 = 游戏.display.set_mode((640, 480), 0, 32) # 设置窗口标题 游戏.display.set_cap 阅读全文
posted @ 2019-09-03 16:27 seawind2012 阅读(214) 评论(0) 推荐(0) 编辑
摘要: decode的作用是将其他编码的字符串转换成unicode编码,如str1.decode('gb2312'),表示将gb2312编码的字符串转换成unicode编码 encode的作用是将unicode编码转换成其他编码的字符串,如str2.encode('gb2312'),表示将unicode编码 阅读全文
posted @ 2019-07-12 09:29 seawind2012 阅读(593) 评论(0) 推荐(0) 编辑