Reading from stdin

C GIllespie csgcsg39 at
Wed Mar 10 18:36:32 CET 2004

> probably both your C- and your python scripts use buffered output. So

> the C-program will not print line-by-line but rather en-block after

> many bytes of output have accumulated.


> In your C-program, do this (that's most likely your problem):


> printf("%f\n",x); /* print valuable data */

> fflush(stdout); /* make sure it's written to stdout */

Yep, that was the problem.



More information about the Python-list mailing list