Version 10 of How to ensure my Windows or MacOS Tk process has a console

Updated 2011-01-16 08:35:26 by RLE

[... catch { console show } ...]

This gives you a toplevel where stdout and stderr go, and you can also interact with the Tcl interpreter.


The menu page has a piece of code that you can use to add a 'Show Console' operation to the system menu. It's a handy thing to have in any Tk application.

RS very often adds this little debugging helper to a Tk script:

 bind . ? {console show}

One could use <F1> in place of ?, if the toplevel takes keyboard input.


[ Category Mac | Category Windows ]