html5支持python吗,python BaseHttpServer是否支持Html5?

我正在使用Python-2.6.6的BaseHttpServer。我无法使用标签。 Python-2.6真的支持HTML5吗?

这可能会更有帮助:

Traceback (most recent call last):

File "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/SocketServer.py", line 283, in _handle_request_noblock

self.process_request(request, client_address)

File "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/SocketServer.py", line 309, in process_request

self.finish_request(request, client_address)

File "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/SocketServer.py", line 322, in finish_request

self.RequestHandlerClass(request, client_address, self)

File "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/SocketServer.py", line 617, in __init__

self.handle()

File "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/BaseHTTPServer.py", line 329, in handle

self.handle_one_request()

File "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/BaseHTTPServer.py", line 323, in handle_one_request

method()

File "testServer.py", line 43, in do_GET

self.send_error(404,'File Not Found: %s' % self.path)

File "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/BaseHTTPServer.py", line 357, in send_error

self.send_response(code, message)

File "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/BaseHTTPServer.py", line 382, in send_response

(self.protocol_version, code, message))

File "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/socket.py", line 318, in write

self.flush()

File "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/socket.py", line 297, in flush

self._sock.sendall(buffer(data, write_offset, buffer_size))

error: [Errno 32] Broken pipe

服务器端:

if self.path.endswith(".ts"):

f = open("simpsons.ts", 'r')

self.send_response(200)

self.send_header('Content-type', 'video/mpegts')

self.end_headers()

self.wfile.write(f.read())

return

客户端:

video width='320' height='240' src="simpsons.ts" controls="controls" /video

图像代码(工作):

服务器端:

if self.path.endswith(".png"):

f = open("ps_logo2.png", 'r')

self.send_response(200)

self.send_header('Content-type', 'image/png')

self.end_headers()

self.wfile.write(f.read())

return

客户端:

img src="ps_logo2.png" alt="No Image"/

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值