Ticket UUID: | 532540 | |||
Title: | Normalize [console] | |||
Type: | RFE | Version: | None | |
Submitter: | dgp | Created on: | 2002-03-20 16:13:25 | |
Subsystem: | 54. [console] | Assigned To: | hobbs | |
Priority: | 7 High | Severity: | ||
Status: | Open | Last Modified: | 2004-03-03 02:30:20 | |
Resolution: | None | Closed By: | ||
Closed on: | ||||
Description: |
On Windows and Mac, wish (not Tk!) includes a [console] command for controlling a console to which it redirects Tcl's stdout and stderr channels. When [package require Tk] brings Tk into a tclsh, there is no [console] and there is no console. On Unix, there is no console and no [console]. It is simple to add [console] to wish on Unix, by enabling the Tk_InitConsoleChannels in Tk_Main and adding a call to Tk_CreateConsoleWindow in Tcl_AppInit. However, this has the effect of losing access to the real standard channels -- a big loss on Unix. On Windows, with the makefile.vc, one can build a wishc.exe program that behaves more like wish on Unix. No [console] and use of the "real" standard channels of a DOS console. Because of all these variants it is somewhat unpleasant to write code that tries to use [console], with [catch]es or [if $tcl_platform...] all over the place. A revisions that normalized the availability and behavior of [console] would be welcome. | |||
User Comments: |
dgp added on 2004-03-03 02:30:20:
Logged In: YES user_id=80530 This topic is getting hot on TCLCORE. dgp added on 2003-11-14 00:30:25: Logged In: YES user_id=80530 see also 480944 |
