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