def warning(*args):
    """Display warning message via stderr or GUI."""
    if sys.stdin.isatty():
        print('WARNING:', *args, file=sys.stderr)
    else:
        notify_warning(*args)
Display warning message via stderr or GUI.