Nice "bug" to loose a contest
azi.stdout at gmail.com
azi.stdout at gmail.com
Mon Apr 9 08:19:16 EDT 2007
On Apr 8, 1:40 pm, "aspineux" <aspin... at gmail.com> wrote:
> This code works like the python one,
> I dont use buffered stdio f... functions,
> but the more 'system call' read and write
>
> int main()
> {
> char buf[120];
> int len;
>
> while (len=read(1, buf, sizeof(buf))) {
> write(1, buf, len);
> }
> return 0;
>
> }
>
Yeah, I've noticed that too, altough I'm clueless on how stdio handles
that differently. Now I'm wondering, what's the behaviour of the
Python snippet that reads from stdout in Windows.. Can someone on
Windows try it and report please?
More information about the Python-list
mailing list