parser = OptionParser(usage='usage: %prog [options] arguments')
parser.add_option('-f', '--file', dest='filename', help='foo help')
options, args = parser.parse_args()
if options.filename is None:
    parser.error('Filename not given')
Is it possible to make an option in optparse a mandatory?