def warning(self, text):
        "print warning message to stderr, possibly with filename and lineno"
        if self.lineno > 0:
            print >> sys.stderr, '%s:%i: warning: %s' % (self.infile, self.lineno, text)
        else:
            print >> sys.stderr, '\nWarning %s: %s\n' % (self.progname, text)
print warning message to stderr, possibly with filename and lineno
recipes/Python/302262_Handling_commline_arguments_options_arguments/recipe-302262.py