Scripting with Tcl on MS Windows

If you use a Tcl shell such as tclsh84.exe for any scripting, you will want rlwrap.

What you get is not just prior commands a keystroke away with the up-arrow key, you also get the command history from previous sessions which you have aleady closed.

rlwrap is a ‘readline’ wrapper for most any console application ( I used to use it for io, the language, before I built my own shell.)

My tclsh.bat is as follows:

@echo off
i:
cd \scripts\tcl
i:\usr\bin\rlwrap tclsh84.exe

One little note: the first edition of Brent Welch’s ‘Practical Programming in Tcl and Tk’ was about 400+ pages. I picked up a new 3rd edition on abebooks.com for pennies – but it rang in at about 800 pages. Almost perlish by page count, but you are getting so much more ;-)

One nice thing: while the book has not blank pages at the back for my automatic pencil, it does have some 20 blank pages scattered through the book. Don’t tell Rich Tennant. Of course a guy with some toxic rubber cement could always paste in a few choice 5th Wave ‘toons.

Leave a Reply

You must be logged in to post a comment.