Python Forum
disposing of buffered output
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
disposing of buffered output
#1
the .flush() method will empty buffered output, but that data actually gets written. how can i dispose of the buffered output and have it not be written. i am doing this to sys.stdout in case that matters. if there is no Pythonic way then i'll just close the file descriptor and then do .flush(). i actually will have nothing more to print. but if i did, i could, on POSIX, os.dup() the file descriptor, before doing the flush, then os.dup2() it back to where expected.
Tradition is peer pressure from dead people

What do you call someone who speaks three languages? Trilingual. Two languages? Bilingual. One language? American.
Reply


Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020