Package wtf :: Module init
[hide private]
[frames] | no frames]

Module init

source code

Application Init

Meta config setup and managed applications helper.


Copyright: Copyright 2012 - 2014 André Malo or his licensors, as applicable

License:

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Author: André Malo

Functions [hide private]
``
config(configfile, opts=None, dump=False)
Initialize the configuration and apply basic parameters
source code
callable
managed_app(configfile)
Create a managed application
source code
Variables [hide private]
  __package__ = 'wtf'
Function Details [hide private]

config(configfile, opts=None, dump=False)

source code 

Initialize the configuration and apply basic parameters

The basic parameters are:

  • The python path
  • sys.checkinterval
  • max descriptors
Parameters:
  • configfile (str) - Config file name (relative to the current working directory)
  • opt - Commandline options
  • dump (bool) - Dump config and exit? If true, the effective config is dumped and the process exits with return code 0. Default: false
Returns: ``
Effective config

managed_app(configfile)

source code 
Create a managed application
Parameters:
  • configfile (str) - Config file name
Returns: callable
Application factory