Exploring terminfo

Grant Edwards grant.b.edwards at gmail.com
Fri Jan 15 21:46:31 EST 2021


On 2021-01-16, Chris Angelico <rosuav at gmail.com> wrote:
> On Sat, Jan 16, 2021 at 1:36 PM Greg Ewing <greg.ewing at canterbury.ac.nz> wrote:
>
>> Can something be done about this? Maybe Python stdio objects
>> should flush all the C stdio streams before writing anything?
>>
>
> Surely it should be the other way around? If you use the C stdio
> streams, flush them after use. Like with everything else that you
> flush.

If you want to be able to mix Python output and FILE* output, you have
to flush either/both. You have to flush the Python output everytime
you do a FILE* output, and you have to fflush the FILE* stream every
time you do Python output. Or you have to keep track of which you did
last time.

It's very ugly.

--
Grant




More information about the Python-list mailing list