[Tutor] MOdule accessing its own date/time stamp?

Kirk Bailey idiot1 at netzero.net
Sun Feb 22 23:59:58 EST 2004


Sure thing. It is just a file, after all.

age=os.path.getmtime(path+filename)

point 'path' at the location of the file, OR make it the current 
directory, and 'filename' the name of the module. 'age' will contain 
the timestamp for when it was last written to.

if it is in the current directory, then " './'+filename " is the thing 
to do. But even if it is, declaring the absolute path to the file and 
it's name will ALWAYS work.

This any help?


Terry Carroll wrote:

> Is there any way for a module to access the timestamp for itself?
> 
> I'd like a module to be able to print out the time/date on which it was 
> last saved.
> 

-- 


end


   think   http://www.tinylist.org/ - $FREE$ software for liberty
+-------+ http://www.pinellasintergroupsociety.org/ - In Her Service
|  BOX  | http://www.listville.net/ - $FREE$ list hosting services
+-------+ http://www.howlermonkey.net/ - $FREE$ email service
   kniht   http://www.sacredelectron.org/ - My personal SCREED pit
          (C)2004 Kirk D Bailey, all rights reserved- but ask!








More information about the Tutor mailing list