Author tim.peters
Recipients
Date 2003-02-09.03:20:11
SpamBayes Score
Marked as misclassified
Message-id
In-reply-to
Content
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>.
History
Date User Action Args
2007-08-23 14:10:56adminlinkissue683160 messages
2007-08-23 14:10:56admincreate