3 if sys
.version_info
[0] == 2:
5 import SimpleHTTPServer
10 class Handler(SimpleHTTPServer
.SimpleHTTPRequestHandler
):
13 Handler
.extensions_map
['.wasm'] = 'application/wasm'
15 httpd
= SocketServer
.TCPServer(("", PORT
), Handler
)
17 print ("python 2 serving at port", PORT
)
21 if sys
.version_info
[0] == 3:
28 Handler
= http
.server
.SimpleHTTPRequestHandler
29 Handler
.extensions_map
['.wasm'] = 'application/wasm'
31 with socketserver
.TCPServer(("", PORT
), Handler
) as httpd
:
32 print("python 3 serving at port", PORT
)