除了本地主机之外,如何配置该主机,以便其他计算机也可以访问它?可行吗?
from wsgiref.simple_server import make_server
def hello_world(environ, start_response):
status = '200 ok'
headers = [('Content-type','text/plain')]
start_response(status, headers)
return ['Hello World']
def run():
httpd = make_server(localhost, 8000, hello_world)
print 'Serving on port 80...'
httpd.serve_forever()
if __name__ == '__main__':
run()
泛舟湖上清波郎朗
相关分类