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

Changeset 713

Show
Ignore:
Timestamp:
10/03/05 18:06:29
Author:
fumanchu
Message:

NNew autoreload GIF in apireference.xml.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/docs/book/xml/apireference.xml

    r706 r713  
    404404            <example> 
    405405                <title>Profiling example</title> 
    406                 <para> 
    407                     <code>from cherrypy.lib import profile class Root: p = 
    408                     profile.Profiler("/path/to/profile/dir") def index(self): self.p.run(self._index) 
    409                     index.exposed = True def _index(self): return "Hello, world!" cherrypy.root = 
    410                     Root()</code> 
    411                      
    412                 </para> 
     406                <programlisting><code>from cherrypy.lib import profile 
     407 
     408class Root: 
     409    p = profile.Profiler("/path/to/profile/dir") 
     410     
     411    def index(self): 
     412        self.p.run(self._index) 
     413    index.exposed = True 
     414     
     415    def _index(self): 
     416        return "Hello, world!" 
     417 
     418cherrypy.root = Root()</code></programlisting> 
    413419            </example> 
    414420            <para>Set the config entry: "profiling.on = True" if you'd rather turn on profiling for 
     
    423429            test.py.</para> 
    424430        </section> 
     431        <section> 
     432            <title>cherrypy.lib.autoreload</title> 
     433            <para>This module provides a brute-force method of reloading application files on the 
     434            fly. When the config entry "autoreload.on" is True (or when "server.environment" is 
     435            "development"), CherryPy uses the autoreload module to restart the current process 
     436            whenever one of the files in use is changed. The mechanism by which it does so is pretty 
     437            complicated:<figure> 
     438                    <title>The autoreload process</title> 
     439                    <mediaobject> 
     440                        <imageobject> 
     441                            <imagedata fileref="autoreload.gif" format="GIF" /> 
     442                        </imageobject> 
     443                    </mediaobject> 
     444                </figure></para> 
     445        </section> 
    425446    </section> 
    426447    <section id="specialfunctions"> 

Hosted by WebFaction

Log in as guest/cpguest to create tickets