Functions | Variables
tornado::autoreload Namespace Reference

Functions

def _check_file
def _close_all_fds
def _reload
def _reload_on_update
def add_reload_hook
def main
def start
def wait
def watch

Variables

 _reload_attempted = False
list _reload_hooks = []
string _USAGE
tuple _watched_files = set()
 signal = None

Function Documentation

def tornado.autoreload._check_file (   modify_times,
  path 
) [private]

Definition at line 166 of file autoreload.py.

def tornado.autoreload._close_all_fds (   io_loop) [private]

Definition at line 130 of file autoreload.py.

def tornado.autoreload._reload ( ) [private]

Definition at line 179 of file autoreload.py.

def tornado.autoreload._reload_on_update (   modify_times) [private]

Definition at line 140 of file autoreload.py.

Add a function to be called before reloading the process.

Note that for open file and socket handles it is generally
preferable to set the ``FD_CLOEXEC`` flag (using `fcntl` or
`tornado.platform.auto.set_close_exec`) instead of using a reload
hook to close them.

Definition at line 119 of file autoreload.py.

Command-line wrapper to re-run a script whenever its source changes.

Scripts may be specified by filename or module name::

    python -m tornado.autoreload -m tornado.test.runtests
    python -m tornado.autoreload tornado/test/runtests.py

Running a script with this wrapper is similar to calling
`tornado.autoreload.wait` at the end of the script, but this wrapper
can catch import-time problems like syntax errors that would otherwise
prevent the script from reaching its call to `wait`.

Definition at line 230 of file autoreload.py.

def tornado.autoreload.start (   io_loop = None,
  check_time = 500 
)
Restarts the process automatically when a module is modified.

We run on the I/O loop, and restarting is a destructive operation,
so will terminate any pending requests.

Definition at line 81 of file autoreload.py.

Wait for a watched file to change, then restart the process.

Intended to be used at the end of scripts like unit test runners,
to run the tests again after any source file changes (but see also
the command-line interface in `main`)

Definition at line 95 of file autoreload.py.

def tornado.autoreload.watch (   filename)
Add a file to the watch list.

All imported modules are watched by default.

Definition at line 109 of file autoreload.py.


Variable Documentation

Definition at line 137 of file autoreload.py.

Definition at line 116 of file autoreload.py.

Initial value:
00001 """\
00002 Usage:
00003   python -m tornado.autoreload -m module.to.run [args...]
00004   python -m tornado.autoreload path/to/script.py [args...]
00005 """

Definition at line 223 of file autoreload.py.

Definition at line 106 of file autoreload.py.

Definition at line 78 of file autoreload.py.



roswww
Author(s): Jonathan Mace
autogenerated on Thu Jan 2 2014 11:53:30