A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2004-August/048202.html below:

[Python-Dev] Re: Adding 'lexists()' to os.path

[Python-Dev] Re: Adding 'lexists()' to os.path [Python-Dev] Re: Adding 'lexists()' to os.pathJeff Epler jepler at unpythonic.net
Sun Aug 22 16:18:19 CEST 2004
On Sun, Aug 22, 2004 at 02:17:00PM +0100, Paul Moore wrote:
> As an alternative, would there be any value in cacheing the last stat
> result?

Well, code like this would break:

    def wait_for_change(filename, delay=.1):
        stamp = os.stat(filename).st_mtime
        while 1:
            time.sleep(delay)
            if os.stat(filename).st_mtime != stamp: break

Hm ... 
>>> import statcache
/usr/lib/python2.3/statcache.py:8: DeprecationWarning: The statcache module is obsolete.  Use os.stat() instead.

Jeff
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://mail.python.org/pipermail/python-dev/attachments/20040822/c4236a3d/attachment.pgp
More information about the Python-Dev mailing list

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4