Bug in os.path.getatime (3rd try)

Edward C. Jones edcjones at erols.com
Sat Feb 19 23:52:25 EST 2000


My ISP seems to have lost my first two attempts to post.

Here is a bug in the python library program "posixpath.py"
(Python 1.5.2 Linux). "os.path.getatime" returns the mtime.

def getmtime(filename):
    """Return the last modification time of a file, reported by
os.stat()."""
    st = os.stat(filename)
    return st[stat.ST_MTIME]

def getatime(filename):
    """Return the last access time of a file, reported by
os.stat()."""
    st = os.stat(filename)
    return st[stat.ST_MTIME]





More information about the Python-list mailing list