Re: Get age of a file/dir

2006-08-02 Thread Antoon Pardon
On 2006-08-01, Carl J. Van Arsdall <[EMAIL PROTECTED]> wrote: > I've been looking around the OS module and I haven't found anything > useful yet. Does anyone know how to get the age of a file or directory > in days? I'm using unix and don't seem to find anything that will help > me. The only

Get age of a file/dir

2006-08-01 Thread Thomas Thomas
what abt   os.path.getmtime or may be os.stat(filename)[ST_MTIME];    cheers -Thomas Thomas[EMAIL PROTECTED]Phone.  +64 7 855 8478Fax.  +64 7 855 8871 -- http://mail.python.org/mailman/listinfo/python-list

Re: Get age of a file/dir

2006-08-01 Thread Simon Forman
url81-1 wrote: > Actually this has nothing to do with datetime.datetime -- he's asking > how to find the created time of the directory. > > Python has a builtin module called "stat" (afer sys/stat.h) which > includes ST_ATIME, ST_MTIME, ST_CTIME members which are times accessed, > modified, and cr

Re: Get age of a file/dir

2006-08-01 Thread url81-1
Actually this has nothing to do with datetime.datetime -- he's asking how to find the created time of the directory. Python has a builtin module called "stat" (afer sys/stat.h) which includes ST_ATIME, ST_MTIME, ST_CTIME members which are times accessed, modified, and created, respectively. Best

Re: Get age of a file/dir

2006-08-01 Thread Jim
Carl J. Van Arsdall wrote: > I've been looking around the OS module and I haven't found anything > useful yet. Does anyone know how to get the age of a file or directory > in days? I'm using unix and don't seem to find anything that will help > me. The only function that comes close so far is >

Get age of a file/dir

2006-08-01 Thread Carl J. Van Arsdall
I've been looking around the OS module and I haven't found anything useful yet. Does anyone know how to get the age of a file or directory in days? I'm using unix and don't seem to find anything that will help me. The only function that comes close so far is os.path.getctime(path) However