单例模式测试
单例模式只有一个实例
静态方法+静态字段
所有的实例中封装的内容相同时,用单利模式
`
from wsgiref.simple_server import make_server
def Runsever(environ,start_response):
start_response(status = '200 OK',headers = [('Content-Type','text/html')])
url = environ['PATH_INFO']
print(url)
return 'oldboy'
if name == 'main':
httpd = make_server('',8008,Runsever)
print('sever http on port 8008...')
httpd.serve_forever()
`