-from .helpers import parse_args, register_fonts, path
+from .helpers import parse_args, dump_config, register_fonts, path
parse_args()
from kivy.core.window import Window
from kivy.lang import Builder
+dump_config()
register_fonts()
if not Config.music_path.endswith("/"):
Config.music_path = Config.music_path + "/"
+def dump_config():
+ max_size = max(max(map(len, Configs_order)), len('config'))
+ info_print("{:<{}} : {}".format(
+ "config", max_size, Config.yml_file))
+ for item in Config.__dict__:
+ if item in Configs_order:
+ info_print("{:<{}} : {}".format(
+ item, max_size, getattr(Config, item)))
+
def build_config(args):
stream = open(Config.yml_file, "r")
try:
Logger.warn('MusicSampler: ' + message, exc_info=with_trace)
+def info_print(message, with_trace=None):
+ if with_trace is None:
+ with_trace = (Logger.getEffectiveLevel() < logging.WARN)
+ with_trace &= (sys.exc_info()[0] is not None)
+
+ Logger.info('MusicSampler: ' + message, exc_info=with_trace)
+