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

Changeset 1615

Show
Ignore:
Timestamp:
02/08/07 12:22:47
Author:
fumanchu
Message:

More doc updates.

Files:

Legend:

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

    r1611 r1615  
    182182    engine.start() 
    183183 
     184 
    184185try: 
    185186    from threading import local as _local 
     
    187188    from cherrypy._cpthreadinglocal import local as _local 
    188189 
    189 # Create a threadlocal object to hold the request, response, and other 
    190 # objects. In this way, we can easily dump those objects when we stop/start 
    191 # a new HTTP conversation, yet still refer to them as module-level globals 
    192 # in a thread-safe way. 
    193190class _Serving(_local): 
    194191    """An interface for registering request and response objects. 
     
    196193    Rather than have a separate "thread local" object for the request and 
    197194    the response, this class works as a single threadlocal container for 
    198     both objects. 
     195    both objects (and any others which developers wish to define). In this 
     196    way, we can easily dump those objects when we stop/start a new HTTP 
     197    conversation, yet still refer to them as module-level globals in a 
     198    thread-safe way. 
    199199    """ 
    200200     
     
    220220        self.__dict__.clear() 
    221221 
     222# The name "_serving" should be removed in 3.1. 
    222223serving = _serving = _Serving() 
    223224 
     
    276277 
    277278# Create thread_data object as a thread-specific all-purpose storage 
    278 thread_data = _local() 
     279class _ThreadData(_local): 
     280    """A container for thread-specific data.""" 
     281thread_data = _ThreadData() 
    279282 
    280283 
  • trunk/cherrypy/_cplogging.py

    r1564 r1615  
    3131     
    3232    def error(self, msg='', context='', severity=logging.DEBUG, traceback=False): 
    33         """Write to the 'error' log. 
     33        """Write to the error log. 
    3434         
    3535        This is not just for errors! Applications may call this at any time 
     
    4141     
    4242    def __call__(self, *args, **kwargs): 
     43        """Write to the error log. 
     44         
     45        This is not just for errors! Applications may call this at any time 
     46        to log application-specific information. 
     47        """ 
    4348        return self.error(*args, **kwargs) 
    4449     
     
    100105        self._set_screen_handler(self.error_log, newvalue) 
    101106        self._set_screen_handler(self.access_log, newvalue) 
    102     screen = property(_get_screen, _set_screen) 
     107    screen = property(_get_screen, _set_screen, 
     108                      doc="If True, error and access will print to stdout.") 
    103109     
    104110     
     
    134140    def _set_error_file(self, newvalue): 
    135141        self._set_file_handler(self.error_log, newvalue) 
    136     error_file = property(_get_error_file, _set_error_file) 
     142    error_file = property(_get_error_file, _set_error_file, 
     143                          doc="The filename for self.error_log.") 
    137144     
    138145    def _get_access_file(self): 
     
    143150    def _set_access_file(self, newvalue): 
    144151        self._set_file_handler(self.access_log, newvalue) 
    145     access_file = property(_get_access_file, _set_access_file) 
     152    access_file = property(_get_access_file, _set_access_file, 
     153                           doc="The filename for self.access_log.") 
    146154 
  • trunk/cherrypy/wsgiserver/__init__.py

    r1599 r1615  
    3636as you want in one instance: 
    3737 
    38     wsgi_apps = [('/', my_crazy_app), (/blog', my_blog_app)] 
     38    wsgi_apps = [('/', my_crazy_app), ('/blog', my_blog_app)] 
    3939 
    4040""" 

Hosted by WebFaction

Log in as guest/cpguest to create tickets