---
title: "[Python]web服务器总结篇"
author: "MyEyeOfJava"
date: "2012-09-13T15:29:40Z"
tags: []
categories: ["编程语言"]
slug: "python-web"
draft: false
lastmod: "2012-09-13T15:29:40Z"
id: 1677919
url: "https://myeyeofjava.iteye.com/blog/1677919"
---

1.一句话搭建web服务器，主要用于文件共享
python -m SimpleHTTPServer 

两行代码的，保存为Python脚本执行：

import SimpleHTTPServer
SimpleHTTPServer.test() 

默认端口为8000，直接访问http://localhost:8000即可，根路径是运行命令或脚本的文件夹

2.miniWeb.py--BottleWeb框架（一个文件的WEB服务器）
[中文快速入门](http://pynotes.appspot.com/static/bottle/index.htm)
[中文参考文档](http://pynotes.appspot.com/static/bottle/docs.htm)
建议使用，真的比java简单的多

3.web.py使用人数多，参考资料多
推荐一篇博客：
http://vvonderblog.appspot.com/2009/11/10/python-web-framework-webpy.html

4.Django