Re: [Tkinter-discuss] Tracebacks

2014-03-01 Thread Michael O'Donnell
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

Re: [Tkinter-discuss] Tracebacks

2014-02-28 Thread Bob Greschke
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

Re: [Tkinter-discuss] Tracebacks

2014-02-28 Thread Cam
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,

[Tkinter-discuss] Tracebacks

2014-02-28 Thread Bob Greschke
This isn't quite a Tkinter thing, but why can't some clever person (I couldn't do it) make it possible for you to put something like this #! /usr/bin/python -t "/home/me/error.txt",stderr at the beginning of a Python program and have the interpreter direct all of the traceback messages to the f