Bugs item #1686475, was opened at 2007-03-23 03:31 Message generated for change (Comment added) made by loewis You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1686475&group_id=5470
Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: Python Library Group: Python 2.5 Status: Open Resolution: None Priority: 5 Private: No Submitted By: d roberts (dcroberts) Assigned to: Martin v. Löwis (loewis) Summary: os.stat() WindowsError 13 when file in use Initial Comment: Using 2.5 Sept 19, 2006 on Windows XP, 32-bit. os.stat() on an "in use" file (i.e., open by another process) erroneously returns WindowsError [Error 13]. The file stats should be available on an open file, even if you cannot read/write the file itself. Python 2.4 correctly returns the stats on the file. ---------------- CORRECT in 2.4: Python 2.4.4 (#71, Oct 18 2006, 08:34:43) [MSC v.1310 32 bit (Intel)] on win32 >>> import os >>> os.stat('c:\\hiberfil.sys') (33206, 0L, 2, 1, 0, 0, 804311040L, 1173962381, 1173962381, 1069302780) ----------------- ERROR in 2.5: Python 2.5 (r25:51908, Sep 19 2006, 09:52:17) [MSC v.1310 32 bit (Intel)] on win32 >>> import os >>> os.stat("c:\\hiberfil.sys") Traceback (most recent call last): File "<stdin>", line 1, in <module> WindowsError: [Error 13] The process cannot access the file because it is being used by another process: 'c:\\hiberfil.sys' ---------------------------------------------------------------------- >Comment By: Martin v. Löwis (loewis) Date: 2007-03-23 11:24 Message: Logged In: YES user_id=21627 Originator: NO It certainly is; Python is likely opening the file in the wrong mode now. I'll investigate, although contributions would be welcome. ---------------------------------------------------------------------- Comment By: Georg Brandl (gbrandl) Date: 2007-03-23 11:15 Message: Logged In: YES user_id=849994 Originator: NO May this be related to rev. 42230 - "Drop C library for stat/fstat on Windows." ? ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1686475&group_id=5470 _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com