B t `@s0dZddlZddlZddlZGdddeZdS)z This is a convenience class that configures the PyUtilib Component Architecture for a named application. This class registers and activates a variety of plugins that are commonly used in simple applications. Nc@s>eZdZdddZddZddZdd Zd d Zd d ZdS)SimpleApplicationNcCs||_|dkrd|_n||_tjjj|j|_tjj ||_tjj ||_ t |j j_tjj||_tjjjd|dd|_dS)Nz config.iniZ EggLoaderZpca) namespaceenv)namefilenamepyutilib componentcoreZ PluginGlobalsZadd_envrconfig ConfigurationZEnvironmentConfigZ _env_configosgetcwdoptionspathZ LoggingConfigloggerZ PluginFactoryZ _egg_plugin)selfrrrA/tmp/pip-unpacked-wheel-cqckmaqz/pyutilib/component/app/simple.py__init__szSimpleApplication.__init__cCs|j|dS)z-Load a configuration file, and update optionsN)r load)rrrrr configure$szSimpleApplication.configurecCs|j|dS)zSave a configuration fileN)r save)rrrrrsave_configuration(sz$SimpleApplication.save_configurationcCs|jdS)zPerform cleanup operationsN)rshutdown)rrrrexit,szSimpleApplication.exitcCs|j|dS)zGenerate logging outputN)rlog)rmessagerrrr0szSimpleApplication.logcCs|jdS)zFlush the log outputN)rflush)rrrrr4szSimpleApplication.flush)N) __name__ __module__ __qualname__rrrrrrrrrrrs  r)__doc__Zpyutilib.component.corerZpyutilib.component.configr objectrrrrr s