I can open a file for unbuffered access with open('foo.txt', 'r+', buffering=0). Is there a way to set buffering=0 as the default, or at least for an entire python file?
Asked
Active
Viewed 80 times
0
askvictor
- 3,361
- 3
- 30
- 41
-
please check this I believe this should you: https://stackoverflow.com/a/107721/18047470 – Jayaraju Medisetti Jan 31 '22 at 07:08
-
@JayarajuMedisetti thanks, but that only applies to stdin/stdout; I'm looking for a solution for file IO. – askvictor Jan 31 '22 at 20:58