Message248578
Oh, one nuance - the reason my except isn't triggering is that the write is happening in interpreter shutdown - in flush_std_files.
Adding a a flush there allows that to work, but its fugly:
---
import sys
try:
print("What... is your quest?")
# Workaround bug 24864: force the write to be immediate
sys.stdout.flush()
except:
sys.stderr.write("Exception in program.\n")
e = sys.exc_info()[1]
try:
# Workaround bug 24864 close the file so flush_std_files doesn't run
# during interpreter cleanup.
sys.stdout.close()
finally:
raise e from None
--- |
|
Date |
User |
Action |
Args |
2015-08-14 10:38:08 | rbcollins | set | recipients:
+ rbcollins, serhiy.storchaka |
2015-08-14 10:38:08 | rbcollins | set | messageid: <1439548688.0.0.846509551874.issue24864@psf.upfronthosting.co.za> |
2015-08-14 10:38:07 | rbcollins | link | issue24864 messages |
2015-08-14 10:38:07 | rbcollins | create | |
|