Python做磁盘文件服务器


Python #文件服务器2012-11-20 09:51

代码如下:

from BaseHTTPServer import HTTPServer
from SimpleHTTPServer import SimpleHTTPRequestHandler
from SocketServer import ThreadingMixIn
class ThreadingServer(ThreadingMixIn,HTTPServer):
    pass
serveraddr=('',8765)   # http://yige.org
srvr=ThreadingServer(serveraddr,SimpleHTTPRequestHandler)
srvr.serve_forever()
效果图:



相关文章

粤ICP备11097351号-1