import warnings


def prettywarn(msg, warntype):
    """Prints a suppressable warning without stack or line info."""
    original = warnings.formatwarning
    def _pretty_fmt(message, category, filename, lineno, line=None):
        return "{0}: {1}\n".format(category.__name__, message)
    warnings.formatwarning = _pretty_fmt
    warnings.warn(msg, warntype)
    warnings.formatwarning = original