Author sbt
Recipients sbt
Date 2012-07-06.00:03:25
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
In Python 3.3 (but not earlier) os.stat() is documented to work with file descriptors.  (os.path.exists() also works with fds since it is implemented in terms of os.stat(), although that is *not* documented.)

However, on Windows if fd is not open then os.stat(fd) triggers an assertion error or crash:

  File: f:\dd\vctools\crt_bld\self_x86\crt\src\osfinfo.c
  Line: 316
  Expression: (_osfile(fh) & FOPEN)

Note that os.fstat() fails on Windows with OSError(EBADF, ...).
Date User Action Args
2012-07-06 00:03:26sbtsetrecipients: + sbt
2012-07-06 00:03:26sbtsetmessageid: <>
2012-07-06 00:03:25sbtlinkissue15261 messages
2012-07-06 00:03:25sbtcreate