Hi Bob,
When my program starts up, I run:
outstr=codecs.open(logfile, "w", 'utf-8')
sys.stderr = outstr
sys.stdout = outstr
That should do what you want.
The stream will close when the program closes.
Takes stderr AND normal print, but you could
drop the line for stdout
mick
On 28 Februa
On 2014-02-28, at 12:08, Bob Greschke wrote:
It doesn't, this would just be more elegant, right? It just seems funny that
the interpreter doesn't help out this one little bit more. I'd even say why
not just have a Python command that you put in your program (not on the #!
line) that tells t
I'm probably not understanding the question. How does what you propose differ
from wrapping your whole application in a try/except so that any uncaught
exceptions result in information being written to error.txt?
Cam
On 14-02-28 11:33 AM, Bob Greschke wrote:
This isn't quite a Tkinter thing,