Resetting modification time
Greg Peretti
gperetti at abqjournal.com
Mon Aug 15 17:03:56 EDT 2005
I'm new to Python and would appreciate being pointed in the right
direction.
I'm trying to create a simple script that would note the modification
time of a file, perform some changes to the file and then reset the
modification time to the pre-change time.
The area I'm having difficulty with is the resetting the modification
time. According to the O'Reilly book I have, using utime in this way -
os.utime(testfile, (1124137226, 1124137227)) (those are just sample
numbers) - would do so, but I'm generating an OSError. Any Ideas?
Greg Peretti
web developer
www.abqjournal.com
(505) 823-3888
-----------------------------------------------------------------
-----------------------------------------------------------------
"Enjoy every sandwich."
Warren Zevon
"If you ever drop your keys into a river of molten lava, let 'em go,
because, man, they're gone."
Jack Handey
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: text/enriched
Size: 958 bytes
Desc: not available
URL: <http://mail.python.org/pipermail/python-list/attachments/20050815/17931f0d/attachment.bin>
More information about the Python-list
mailing list