def init_cli(no_translations=False): """This needs to be called before any API can be used. Might raise in case of an error. Like init() but for code not using Gtk etc. """ from quodlibet import config _init_python() config.init_defaults() if not no_translations and "QUODLIBET_NO_TRANS" not in environ: _init_gettext() _init_formats()
def init_cli(no_translations=False, config_file=None): """This needs to be called before any API can be used. Might raise in case of an error. Like init() but for code not using Gtk etc. """ global _cli_initialized if _cli_initialized: return _init_python() config.init_defaults() if config_file is not None: config.init(config_file) _init_gettext(no_translations) _init_formats() _init_g() _cli_initialized = True
def init_cli(no_translations=False, config_file=None): """This needs to be called before any API can be used. Might raise in case of an error. Like init() but for code not using Gtk etc. """ global _cli_initialized if _cli_initialized: return _init_python() config.init_defaults() if config_file is not None: config.init(config_file) _init_gettext(no_translations) _init_formats() _init_g() _cli_initialized = True
def init_cli(no_translations=False): """This needs to be called before any API can be used. Might raise in case of an error. Like init() but for code not using Gtk etc. """ global _cli_initialized if _cli_initialized: return from quodlibet import config _init_python() config.init_defaults() if not no_translations and "QUODLIBET_NO_TRANS" not in environ: _init_gettext() _init_formats() _init_g() _cli_initialized = True