[Zope-Checkins] CVS: Zope3 - z3.py:1.1.2.1
Brian Lloyd
brian@digicool.com
Fri, 16 Nov 2001 12:40:51 -0500
Update of /cvs-repository/Zope3
In directory cvs.zope.org:/tmp/cvs-serv25268
Added Files:
Tag: Zope-3x-branch
z3.py
Log Message:
add logging
=== Added File Zope3/z3.py ===
import sys, os, getopt, string
sys.setcheckinterval(120)
program = sys.argv[0]
here = os.path.join(os.getcwd(), os.path.split(program)[0])
sys.path=[os.path.join(here,'lib','python'),
here] + filter(None, sys.path)
from Zope.Publisher.DefaultPublication import DefaultPublication
import Zope.Server, asyncore, zLOG
Zope.Server.setNumberOfThreads(4)
class App:
""" """
def __call__(self, URL):
return 'You have reached the wrong number. Please try again later.'
zLOG._set_log_dest(sys.stderr)
server = Zope.Server.zhttp_server('', 8080)
publication = DefaultPublication(App())
handler = Zope.Server.zhttp_handler(publication, '', {})
server.install_handler(handler)
asyncore.loop()
sys.exit(0)