From: Mark Henderson Date: Mon, 7 Dec 2015 21:35:52 +0000 (-0500) Subject: Update options.py X-Git-Tag: v4.4.0b1~61^2~2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=97705b920d8330e3cb115fb9a04f041509520171;p=thirdparty%2Ftornado.git Update options.py It is unclear in the documentation what tornado.options.parse_config_file does and how it works. I added a little text to the copy that should clarify its purpose. --- diff --git a/tornado/options.py b/tornado/options.py index bdb5baa0a..5477f833f 100644 --- a/tornado/options.py +++ b/tornado/options.py @@ -41,6 +41,13 @@ either:: # or tornado.options.parse_config_file("/etc/server.conf") +.. note: + + When using tornado.options.parse_config_file(), the only options that are set + are ones that were previously defined either tornado.options.parse_command_line + or tornado.options.define. torndo.options.parse_config_file is used mainly as a + means to offer overriding settings for different environments. + Command line formats are what you would expect (``--myoption=myvalue``). Config files are just Python files. Global names become options, e.g.::