Changeset 713
- Timestamp:
- 10/03/05 18:06:29
- Files:
-
- trunk/docs/book/xml/apireference.xml (modified) (2 diffs)
- trunk/docs/book/xml/autoreload.gif (added)
- trunk/docs/book/xml/gettingstarted.xml (modified) (previous)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/docs/book/xml/apireference.xml
r706 r713 404 404 <example> 405 405 <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 408 class 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 418 cherrypy.root = Root()</code></programlisting> 413 419 </example> 414 420 <para>Set the config entry: "profiling.on = True" if you'd rather turn on profiling for … … 423 429 test.py.</para> 424 430 </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> 425 446 </section> 426 447 <section id="specialfunctions">

