# -*- coding: utf-8 -*-

import sys
import cfg, wbfs2fat

def confirm(msg="", forcedisplay=0):
    if msg and (cfg.options.confirm or forcedisplay):
        sys.stdout.write("\n"+msg)
    if cfg.options.confirm:
        try:
            raw_input("\nPress Enter to continue or Control+C to cancel")
#3            input("\nPress Enter to continue or Control+C to cancel")
        except KeyboardInterrupt:
            sys.exit(1)

def report(lvl,msg):
    if lvl<=cfg.options.verbosity: print(msg)

cfg.report = report
cfg.confirm = confirm
cfg.report(1,"wbfs2fat {} {}".format(wbfs2fat.version, wbfs2fat.date))
