• 授权协议:-
  • 开发厂商:-
  • 软件语言:Python
  • 更新日期:2008-11-12
Nevow

Nevow 是一个用 Python 写的用来构建web应用程序的工具。# Run using 'twistd -noy file.tac', then point your browser to. # Don't do it this way. Better ways are coming.

Nevow 小型Python Web框架 项目简介

Nevow 是一个用 Python 写的用来构建web应用程序的工具。代码有如:######################################################################
# Run using 'twistd -noy file.tac', then point your browser to
# http://localhost:8080
# A very simple Nevow site.
# Don't do it this way. Better ways are coming.
######################################################################

from twisted.application import service, internet

from nevow import appserver
from nevow import rend

class MyPage ( rend.Page ):

def renderHTTP ( self, ctx ):
html = \
'' + \
'"Nevow Tutorial"' + \
'Hi there'
return html

######################################################################
# Nevow Boilerplate
######################################################################

application = service.Application ( "nevowdemo1" )
port = 8080
res = MyPage()
site = appserver.NevowSite ( res )
webService = internet.TCPServer ( port, site )
webService.setServiceParent ( application )

Nevow 小型Python Web框架 相关推荐

Nevow 小型Python Web框架 评论内容