Time in python

Peter Hansen peter at engcorp.com
Fri May 31 00:12:49 EDT 2002


tritran wrote:
> 
> I mean we have a directory and that directory contain some of the file, I
> want to sort the file according to the time and may be i like to seperate
> the file and the time into 2 parts in order to display in the table like
> -------------------------------------------------
> |File Name                     |    Date                       |
> -------------------------------------------------
> |file1.txt                         |  28/05/2002 6:30      |
> ------------------------------------------------

A combination of Ken's answer, something from the 'time' module,
and os.listdir() should do the trick.  What have you tried so far?
Maybe we can help you with improving it.

-Peter



More information about the Python-list mailing list