Ticket UUID: | 955470 | |||
Title: | TIP 199 alternative | |||
Type: | Support | Version: | None | |
Submitter: | dgp | Created on: | 2004-05-17 21:08:23 | |
Subsystem: | None | Assigned To: | nobody | |
Priority: | 5 Medium | Severity: | ||
Status: | Closed | Last Modified: | 2009-07-29 20:00:26 | |
Resolution: | Closed By: | dkf | ||
Closed on: | 2009-07-29 13:00:26 | |||
Description: |
This small patch to Tcl_Main() allows for a startup script to be evaluated, followed by an interactive prompt, in place of the either/or choice forced by the unpatched tclsh. With the patch applied, after the startup script evaluation is completed successfully, the variable "tcl_interactive" in the master interpreter is examined. If the variable exists, and has the value "1", then interactive prompt operations begin on stdin and stdout. Otherwise, control flows on to the check for a mainLoop. I have some reservations whether adopting this patch is a good idea, but it's a better solution than that proposed by TIP 199. | |||
User Comments: |
dkf added on 2009-07-29 19:57:57:
IP - Comment Removed: 130.88.1.31 dkf added on 2009-07-29 19:57:55: IP - Comment Removed: 130.88.1.31 dkf added on 2009-07-29 19:57:41: IP - Comment Removed: 130.88.1.31 dkf added on 2009-07-29 19:57:38: IP - Comment Removed: 130.88.1.31 dkf added on 2009-07-29 19:57:35: IP - Comment Removed: 130.88.1.31 dkf added on 2009-07-29 19:57:33: IP - Comment Removed: 130.88.1.31 dgp added on 2009-02-14 12:04:49: allow_comments - 1 data_type - 210894 dgp added on 2004-05-18 04:10:46: File Added - 87446: test.tcl Logged In: YES user_id=80530 Here's a sample script showing how to make use of the patched tclsh. For normal operations: tclsh test.tcl For interactivity following the startup script evaluation: tclsh test.tcl -interactive dgp added on 2004-05-18 04:08:23: File Added - 87445: tip199.patch |