Get the date of last modification of a file

Peter Hansen peter at
Tue Sep 9 13:36:00 CEST 2003

Manuel Bastioni wrote:
> > > It's possible using only a built-in module?
> >
> > os.path.getmtime()
> ...
>  >>> import os, stat
>  >>> s = os.stat("c:/tmp")
> os isn't built-in :-(

The question was strange, since requiring a true builtin for
this is pointless, so I interpreted the question as though
you were a newbie who didn't use the term "built-in" to mean
what it usually means in Python.  I figured you just wanted
to use a module that came with standard Python instead of 
requiring a separate download.

So since you've clarified that, I'll be interested to see the 
answer to Erik Max Francis' question, too. :-)


More information about the Python-list mailing list