def warning(msg, *args, **kwargs):
 if (len(root.handlers) == 0):
  basicConfig()
 root.warning(msg, *args, **kwargs)

def warning ( msg , * args , ** kwargs ) : if ( len ( root . handlers ) == 0 ) : basicConfig ( ) root . warning ( msg , * args , ** kwargs )
compat for testing with previous @with_app decorator .