Message14527
Logged In: YES
user_id=31435
Figures <wink>. I tried this C program on Win98SE, using
Microsoft's MSVC 6:
#include <stdio.h>
#include <stdlib.h>
void main()
{
char buf[1000];
size_t n;
FILE *f = fopen("temp.txt", "w");
fprintf(f, "%s\n", "Hello, world!");
memset(buf, ' ', sizeof(buf));
n = fread(buf, 1, sizeof(buf), f);
printf("read %d chars, ferror is %d, feof is %d\n",
n, ferror(f), feof(f));
}
It didn't complain. The output was
read 1000 chars, ferror is 0, feof is 0
Since the OS doesn't complain, there's really nothing
Python can do about it short of writing our own file
implementation, and that's a huge project.
When I boosted the buf size in the above to 10000, it said
it read 4082 characters, suggesting it's just reading
whatever bits were left on the disk and sucked into its
internal buffer. File temp.txt was 4097 bytes when the
program ended.
Since Python isn't doing any of this, I'm closing this as
Windows, 3rdParty, and WontFix. BTW, I use Win98SE
too at home, but I don't expect it to act like a real
operating system <wink>. |
|
Date |
User |
Action |
Args |
2007-08-23 14:10:56 | admin | link | issue683160 messages |
2007-08-23 14:10:56 | admin | create | |
|