Message164705
| Author |
sbt |
| Recipients |
sbt |
| Date |
2012年07月06日.00:03:25 |
| SpamBayes Score |
-1.0 |
| Marked as misclassified |
Yes |
| Message-id |
<1341533006.37.0.469874920155.issue15261@psf.upfronthosting.co.za> |
| In-reply-to |
| Content |
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, ...). |
|
History
|
|---|
| 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 |
|