def _access_check(fn, mode):
    return (os.path.exists(fn) and os.access(fn, mode) and (not os.path.isdir(fn)))
def _access_check(fn, mode):
    return (os.path.exists(fn) and os.access(fn, mode) and (not os.path.isdir(fn)))