[Zope-dev] [Patch] Optimization for development mode

Brian Lloyd Brian@digicool.com
Fri, 31 Mar 2000 09:12:07 -0500


> >FYI guys - it looks like getmtime doesn't exist on windows 
> >(and possibly other platforms) - think we'll be able to 
> >get around that by sniffing the stat() structure though.
> 
> Not true! the implementation on windows, in python 1.5.2 is...
> 
> def getmtime(filename):
>     st = os.stat(filename)
>     return st[stat.ST_MTIME]


Hmm - here's what I get with a stock Py 1.5.2 from python.org 
for windows:

>>> import sys, os
>>> dir(os.path)
['__builtins__', '__doc__', '__file__', '__name__', 'basename',
'commonprefix',
'dirname', 'exists', 'expanduser', 'expandvars', 'isabs', 'isdir',
'isfile', 'is
link', 'ismount', 'join', 'normcase', 'normpath', 'os', 'samefile',
'sameopenfil
e', 'samestat', 'split', 'splitdrive', 'splitext', 'stat', 'string',
'varchars',
 'walk']
>>> os.path.getmtime
Traceback (innermost last):
  File "<stdin>", line 1, in ?
AttributeError: getmtime
>>>

Where are you seeing the getmtime() implementation in your 
installation? (what module?)


Brian Lloyd        brian@digicool.com
Software Engineer  540.371.6909              
Digital Creations  http://www.digicool.com