'Do actual initialization.
__init__ function only stores the arguments and runs this function. This
function exists for powerline to be able to reload itself: it is easier
to make ``__init__`` store arguments and call overriddable ``init`` than
tell developers that each time they override Powerline.__init__ in
subclasses they must store actual arguments.'

def init(self, ext, renderer_module=None, run_once=False, logger=None, use_daemon_threads=True, shutdown_event=None, config_loader=None):

    self.ext = ext
    self.run_once = run_once
    self.logger = logger
    self.had_logger = bool(self.logger)
    self.use_daemon_threads = use_daemon_threads
    if (not renderer_module):
        self.renderer_module = (u'powerline.renderers.' + ext)
    elif (u'.' not in renderer_module):
        self.renderer_module = (u'powerline.renderers.' + renderer_module)
    elif renderer_module.startswith(u'.'):
        self.renderer_module = ((u'powerline.renderers.' + ext) + renderer_module)
    elif renderer_module.endswith(u'.'):
        self.renderer_module = renderer_module[:(-1)]
    else:
        self.renderer_module = renderer_module
    self.find_config_files = generate_config_finder(self.get_config_paths)
    self.cr_kwargs_lock = Lock()
    self.cr_kwargs = {}
    self.cr_callbacks = {}
    for key in (u'main', u'colors', u'colorscheme', u'theme'):
        self.cr_kwargs[(u'load_' + key)] = True
        self.cr_callbacks[key] = _generate_change_callback(self.cr_kwargs_lock, (u'load_' + key), self.cr_kwargs)
    self.shutdown_event = (shutdown_event or Event())
    self.config_loader = (config_loader or ConfigLoader(shutdown_event=self.shutdown_event, run_once=run_once))
    self.run_loader_update = False
    self.renderer_options = {}
    self.prev_common_config = None
    self.prev_ext_config = None
    self.pl = None
    self.setup_args = ()
    self.setup_kwargs = {}
    self.imported_modules = set()
    self.update_interval = DEFAULT_UPDATE_INTERVAL
