Download Install Tutorial Docs FAQ Tools WikiLicense Team IRC Planet Involvement Shop Book

Changeset 1639

Show
Ignore:
Timestamp:
03/13/07 19:04:14
Author:
fumanchu
Message:

Changed pywebd subpackage to "restsrv".

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/cherrypy/__init__.py

    r1627 r1639  
    174174server = _cpserver.Server() 
    175175 
    176 from cherrypy import pywebd 
    177 engine = pywebd.engine 
     176from cherrypy import restsrv 
     177engine = restsrv.engine 
    178178 
    179179# Timeout monitor 
    180 class _TimeoutMonitor(pywebd.plugins.Monitor): 
     180class _TimeoutMonitor(restsrv.plugins.Monitor): 
    181181     
    182182    def __init__(self, engine, channel=None): 
    183183        self.servings = [] 
    184         pywebd.plugins.Monitor.__init__(self, engine, self.run, channel) 
     184        restsrv.plugins.Monitor.__init__(self, engine, self.run, channel) 
    185185     
    186186    def acquire(self): 
     
    200200 
    201201# Add an autoreloader (the 'engine' config namespace may detach/attach it). 
    202 engine.autoreload = pywebd.plugins.Autoreloader(engine) 
    203 pywebd.plugins.Reexec(engine) 
    204 _thread_manager = pywebd.plugins.ThreadManager(engine) 
     202engine.autoreload = restsrv.plugins.Autoreloader(engine) 
     203restsrv.plugins.Reexec(engine) 
     204_thread_manager = restsrv.plugins.ThreadManager(engine) 
    205205 
    206206 
     
    213213    engine.subscribe('start', server.quickstart) 
    214214     
    215     s = pywebd.plugins.SignalHandler(engine) 
     215    s = restsrv.plugins.SignalHandler(engine) 
    216216    s.set_handler('SIGTERM', engine.stop) 
    217217    s.set_handler('SIGHUP', engine.restart) 
  • trunk/cherrypy/lib/sessions.py

    r1627 r1639  
    114114            # clean_up is in instancemethod and not a classmethod, 
    115115            # so tool config can be accessed inside the method. 
    116             from cherrypy import pywebd 
    117             t = pywebd.plugins.Monitor(cherrypy.engine, self.clean_up, 
    118                                        "CP Session Cleanup") 
     116            from cherrypy import restsrv 
     117            t = restsrv.plugins.Monitor(cherrypy.engine, self.clean_up, 
     118                                        "CP Session Cleanup") 
    119119            t.frequency = self.clean_freq 
    120120            cls.clean_thread = t 
  • trunk/cherrypy/restsrv/__init__.py

    r1627 r1639  
    4040""" 
    4141 
    42 from cherrypy.pywebd import plugins 
     42from cherrypy.restsrv import plugins 
    4343 
    4444try: 
    45     from cherrypy.pywebd import win32 
     45    from cherrypy.restsrv import win32 
    4646    engine = win32.Engine() 
    4747except ImportError: 
    48     from cherrypy.pywebd import base 
     48    from cherrypy.restsrv import base 
    4949    engine = base.Engine() 
  • trunk/cherrypy/restsrv/base.py

    r1631 r1639  
    1 """Base Engine class for pywebd.""" 
     1"""Base Engine class for restsrv.""" 
    22 
    33try: 
  • trunk/cherrypy/restsrv/plugins.py

    r1632 r1639  
    1 """Plugins for a pywebd Engine.""" 
     1"""Plugins for a restsrv Engine.""" 
    22 
    33import os 
     
    296296        if self.frequency > 0: 
    297297            self.thread = PerpetualTimer(self.frequency, self.callback) 
    298             self.thread.setName("pywebd %s" % self.channel) 
     298            self.thread.setName("restsrv %s" % self.channel) 
    299299            self.thread.start() 
    300300     
  • trunk/cherrypy/restsrv/win32.py

    r1627 r1639  
    1 """Windows service for pywebd. Requires pywin32.""" 
     1"""Windows service for restsrv. Requires pywin32.""" 
    22 
    33import win32serviceutil 
     
    77import win32api 
    88 
    9 from cherrypy.pywebd import base 
     9from cherrypy.restsrv import base 
    1010 
    1111 
     
    5252    _svc_display_name_ = "Python Web Service" 
    5353    _svc_deps_ = None        # sequence of service names on which this depends 
    54     _exe_name_ = "pywebd
     54    _exe_name_ = "restsrv
    5555    _exe_args_ = None        # Default to no arguments 
    5656     
     
    5959     
    6060    def SvcDoRun(self): 
    61         from cherrypy import pywebd 
    62         pywebd.engine.start() 
    63         pywebd.engine.block() 
     61        from cherrypy import restsrv 
     62        restsrv.engine.start() 
     63        restsrv.engine.block() 
    6464     
    6565    def SvcStop(self): 
    66         from cherrypy import pywebd 
     66        from cherrypy import restsrv 
    6767        self.ReportServiceStatus(win32service.SERVICE_STOP_PENDING) 
    68         pywebd.engine.stop() 
     68        restsrv.engine.stop() 
    6969 
    7070if __name__ == '__main__': 

Hosted by WebFaction

Log in as guest/cpguest to create tickets