元类1. 类也是对象在大多数编程语言中,类就是一组用来描述如何生成一个对象的代码段。在Python中这一点仍然成立:>>> class ObjectCreator(object): … pass … >>> my_object = ObjectCreator() >>> print(my_object) <__main_...
mini-web框架-url编码python3对url编解码import urllib.parse # Python3 url编码 print(urllib.parse.quote("天安门")) # Python3 url解码 print(urllib.parse.unquote("%E5%A4%A9%E5%AE%89%E9%97%A8")) my_...
mini-web框架-mysql-改my_web.py(修改)import pymysql import time import os import re import sys template_root = "./templates" # 用来存放url路由映射 # url_route = { # "/index.py":index_func...
mini-web框架-mysql-删my_web.py(修改)import pymysql import time import os import re import sys from urllib.parse import unquote template_root = "./templates" # 用来存放url路由映射 # url_route = { # ...
mini-web框架-mysql-增my_web.py(修改)import pymysql import time import os import re import sys from urllib.parse import unquote template_root = "./templates" # 用来存放url路由映射 # url_route = { # ...
mini-web框架-路由支持正则import pymysql import time import os import re template_root = "./templates" # 用来存放url路由映射 # url_route = { # "/index.py":index_func, # "/center.py&qu...
mini-web框架-组装数据为html格式my_web.py(更新)import pymysql import time import os import re template_root = "./templates" # 用来存放url路由映射 # url_route = { # "/index.py":index_func, # &...
mini-web框架-从mysql中查询数据my_web.py(更新)import pymysql import time import os import re template_root = "./templates" # 用来存放url路由映射 # url_route = { # "/index.py":index_func, # &...