Message164705
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:26 | sbt | set | recipients:
+ sbt |
2012-07-06 00:03:26 | sbt | set | messageid: <1341533006.37.0.469874920155.issue15261@psf.upfronthosting.co.za> |
2012-07-06 00:03:25 | sbt | link | issue15261 messages |
2012-07-06 00:03:25 | sbt | create | |
|