def file_uptodate ( fname , cmp_fname ) : try : return ( file_exists ( fname ) and file_exists ( cmp_fname ) and getmtime ( fname ) >= getmtime ( cmp_fname ) ) except OSError : return False
python check if file modified in last minute
Check if a file exists is non - empty and is more recent than cmp_fname .
def file_uptodate(fname, cmp_fname):
    """Check if a file exists, is non-empty and is more recent than cmp_fname.
    """
    try:
        return (file_exists(fname) and file_exists(cmp_fname) and
                getmtime(fname) >= getmtime(cmp_fname))
    except OSError:
        return False