使用Python编写免安装运行时、以Windows后台服务形式运行的WEB服务器
构建环境安装python2.7安装Setup Tools
在https://pypi.python.org/pypi/setuptools获取安装脚本的链接http://peak.telecommunity.com/dist/ez_setup.py,下载并运行
运行"C:\Python27\Scripts>easy_install.exe web.py"
http://sourceforge.net/projects/pywin32/files/pywin32/Build%20218/
# mysetup.pyfrom distutils.core import setupimport py2exesetup(service=["WindowsService"])
python setup.py py2exe
sc create MyPythonServer binPath= f:\desktop\dist\WindowsService.exe
sc start MyPythonServer
在浏览器中访问:”http://127.0.0.1:8089/visit/whatever“,结果显示"you are visiting /visit/whatever"
python访问REST
用Python实现CRUD功能REST服务
Getting RESTful with web.py
Web.py初探:安装与HelloWorld
使用py2exe制作免运行时的可执行文件
Web.py初探:安装与HelloWorld
Create win32 services using Python and py2exe
Python在windows下打包exe程序