def check_directory(option, opt, value):
    try:
        value = str(value)
    except __HOLE__:
        raise OptionValueError(
            _("option %s: invalid %s value: %r") % (opt, what, value))
    #if value and not os.path.isdir(value):
    #    print 'Warning: path %r is not a directory' % (value)
    return value
dataset/ETHPy150Open pearu/pylibtiff/libtiff/optparse_gui.py/check_directory