How often does python flush to a file?

后端 未结 5 1962
礼貌的吻别
礼貌的吻别 2020-11-22 04:33
  1. How often does Python flush to a file?
  2. How often does Python flush to stdout?

I\'m unsure about (1).

As for (2), I believe Python flush

5条回答
  •  南旧
    南旧 (楼主)
    2020-11-22 05:22

    You can also check the default buffer size by calling the read only DEFAULT_BUFFER_SIZE attribute from io module.

    import io
    print (io.DEFAULT_BUFFER_SIZE)
    

提交回复
热议问题