def print_err(*args, **kwargs):
    """ A wrapper for print() that uses stderr by default. """
    if kwargs.get('file', None) is None:
        kwargs['file'] = sys.stderr
    print(*args, **kwargs)
def print_err ( * args , ** kwargs ) : if kwargs . get ( 'file' , None ) is None : kwargs [ 'file' ] = sys . stderr print ( * args , ** kwargs )
A wrapper for print() that uses stderr by default.