Re: Accessing the files by last modified time

2012-03-23 Thread Sangeet
On Thursday, 22 March 2012 17:19:23 UTC+5:30, Chris Rebert wrote: > On Thu, Mar 22, 2012 at 4:33 AM, Sangeet wrote: > > Hi > > > > I am new to the python programming language. > > > > I've been trying to write a script that would access the last modified file > > in one of my directories. I'm us

Re: Accessing the files by last modified time

2012-03-23 Thread Sangeet
On Thursday, 22 March 2012 17:34:43 UTC+5:30, Tim Williams wrote: > On Mar 22, 7:33 am, Sangeet wrote: > > Hi > > > > I am new to the python programming language. > > > > I've been trying to write a script that would access the last modified file > > in one of my directories. I'm using Win XP. >

Re: Accessing the files by last modified time

2012-03-22 Thread Neil Cerutti
On 2012-03-22, Tim Williams wrote: > On Mar 22, 7:33?am, Sangeet wrote: >> Hi >> >> I am new to the python programming language. >> >> I've been trying to write a script that would access the last >> modified file in one of my directories. I'm using Win XP. >> >> I saw a similar topic, on the for

Re: Accessing the files by last modified time

2012-03-22 Thread Peter Otten
Sangeet wrote: > I've been trying to write a script that would access the last modified > file in one of my directories. I'm using Win XP. import os import glob path = r"c:\one\of\my directories\*" youngest_file = max(glob.glob(path), key=os.path.getmtime) -- http://mail.python.org/mailman/li

Re: Accessing the files by last modified time

2012-03-22 Thread Tim Williams
On Mar 22, 7:33 am, Sangeet wrote: > Hi > > I am new to the python programming language. > > I've been trying to write a script that would access the last modified file > in one of my directories. I'm using Win XP. > > I saw a similar topic, on the forum before, however the reply using > (os.pop

Re: Accessing the files by last modified time

2012-03-22 Thread Chris Rebert
On Thu, Mar 22, 2012 at 4:33 AM, Sangeet wrote: > Hi > > I am new to the python programming language. > > I've been trying to write a script that would access the last modified file > in one of my directories. I'm using Win XP. > > I saw a similar topic, on the forum before, however the reply usi