Online Tcl and Tk Tutorials

Document various useful online or interactive Tcl and Tk tutorials. The official Tcl tutorial is discussed at tcltutorial.

These lists have been organized into "tutorial" order, i.e., the order a reader might access them in for most efficient learning. This order takes into account both the quality of the tutorial and the complexity of the information it presents.

Note: This ordering was undertaken on 2012-08-22, and updated on 2013-03-08

Please help collaboratively bubble-sort this list by choosing two consecutive references, evaluating their content, and swapping their order if appropriate! New links should be added at the top of a list to give them the benefit of the doubt, after which, the bubble-sort process will hopefully take them to their proper place

Tcl Tutorials

Title/Link Description Note
Tcl Tutorial by Jan Bodnar. Exceptionally clear and readable
Tcl Tutorial by TutorialsPoint . PDF download avilable This site sometimes has very outdated ways of doing things. Be warned.
The official Tcl Tutorial A Tcl 8.5 tutorial written by Clif Flynt, Neil Madden, Arjen Markus, David Welton and others. The tutorial is intended as a companion to the Tcl manual pages which provide a reference for all Tcl commands. It was written with the goal of helping those who have some knowledge of programming, although they certainly don't have to be experts. Tclwise: Guide to the Tcl programming language, by Salvatore Sanfilippo. This book is an introduction to the main ideas of the Tcl programming language: If you wish to learn a simple and powerful programming language, this book is for you. RS highly recommends this - when reading it, I more than once thought, "wish I had written that myself..." :)
Programming in Tcl Video tutorial on Tcl. Multiple chapters. Seems pretty complete. A wikibooks complete and free Tcl/Tk book/tutorial with nice examples by Richard Suchenwirth
Tcl Tutorial ,by Chris verBurg No mention of {*}, but lots of small examples Tcl Crash Course ,openocd project
Learn Tcl in Y Minutes by PYK. A concise walkthrough and cheatsheet for Tcl 8.6 Tcl for Web Nerdy, by Philip Greenspun, An intro to Tcl using AOLServer as the web engine. Some additional tutorials are mentioned in the summary
Tool Command Language by Jan Newmarch
Tcl Scripting with nmrWish last updated 2009-09-14 Broken link a work in progress providing a tutorial for young people.
Beginning Tcl An interactive community project to teach Tcl scripting On this wiki
Arts and Crafts of Tcl-Tk Programmingand another index to introductory pages, or pages covering fundamental concepts. On this wiki
Intermediate Tclan intermediate tutorial composed of pages on this wiki
Advanced Tclanother, more advanced tutorial composed of pages on this wiki
Superlinux Tcl/Tk Video Tutorials Youtube playlists in Arabic and English, of video tutorials Superlinux on his channel ( ranixlb ) . More than 36 episodes of tutorials. Install this Android application
Superlinux Tcl/Tk AndroWish Video TutorialsThose are video tutorials in spoken Arabic and in English packaged in an Android app. Teaches You how to make applications on Android using Tcl/TkDownload from here.
Superlinux Tcl/Tk Video Tutorials Recently (2019) liberated materials from Superlinux in English. In the form of a youtube playlist. A Non-Programmer's Introduction to Tcl/Tk Stuck with pre-2005 practices, but the basics have changed little since then. Clyf Flynt's Tcl Tutorial icanprogram website An online tutorial written by Binny V Abraham.Out of date (pre-8.5) or maybe even older Doulos offers a 3-day Essential Tcl/Tk instructor led class
Tcl Tutor an interactive tutorial for learning Tcl Recent versions cover only Tcl, not Tk Broken link has a variety of pointers to tutorials Roy Terry recommends a particularly experimental trajectory. Broken link contains pointers to a varity of tutorials A series of PostScript slides used in an introduction/tutorial on Tcl and Tk at several X and Usenix Conferences A Tcl/Tk and Expect Tutorial by Will Morse (mailto:[email protected] )
free online (beginner level) programming courses using Tcl/Tk as a programming language filled with interesting information for the Tcl programmer. For instance, appears to be a working draft of a book initially called "SQL for Web Nerds". It is a tutorial on SQL, using the AOLserver as a base and Tcl as the programming language. There are other items such as , which is the web version of the book "Database Backed Web Sites". Then there is the ArsDigita Community System, a database driven web forum. George Peter Staplin GPS has written some tutorials on how he uses movies, audio, images and PNG cursors with Tcl/Tk in a game he is writing. A rather old document oriented towards Tcl/Tk 8.0 Perhaps one of the Linux users here on the wiki would consider updating and then submit the changes back to ? Broken link Michael Norton's Elementary Computer Graphics article is a Tcl tutorial by Scriptics one of the best Tcl/Tk tutorials imho IBM beginners Tcl/Tk quick start web-based tutorial. This introduction is not fully up-to-date, and has enough questions and errors that one might hesitate to point newbies to it. This tutorial has proven to be less then ideal (written by a non-Tcl type), so this one should be last on your list of sites to learn about Tcl. YouTube Channel "Web of Engineering" - There are some vídeos for very beginners in Tcl/Tk language. The tutorials are in portuguese, but there are links to GitHub where you can download the codes created during the tutorials. This site teaches a lot of languages with a task-oriented approach where the learner is taught to write small but useful applications. I am entering this item here on 2023-04-16.

Tk Tutorials

Title/Link Description Note
Tcl/Tk tutorial By Jan Bodnar. Concise, clear, easy to read An excellent tutorial on Tk & ttk best practices by Mark Roeseman. Covers Perl, Ruby and (soon) Python language bindings to Tk, as well as Tcl. icanprogram website Clyf Flynt's Tcl Tutorial old document, but good for beginners

Tcl Web/CGI/HTML Tutorials

  • BOOK Tcl for Web Nerds is an online book/tutorial. CL advises regarding updates of this resource: "Not recently. FAR from recently. And its culture is quite different from what most Web beginners in 2008 expect. It's the best suggestion I know, though."
  • Tutorials about Rivet ( The Tcl alternative to PHP ) as a video playlist packaged in an Android application. Made by superlinux. Get from here

Other languages


Title/Link Description An HTML version of the TclCommandWriting man page that comes with TclX. Explains the C API to Tcl, providing an introduction/tutorial on writing Tcl extensions. APN This page is way out of date as it is based on the old char* based APIs and not Tcl_Objs. A tutorial on the option database Captain Crumb explains canvases, with a focus on animation. tutorial on Metakit by Mark Roseman Chapters on Tcl programming for Windows Tutorial on TclOO Basic Introduction to TDBC

Other related pages on this wiki

Dead References

The following references currently seem to no-longer be accessible. Rather than delete them, they are listed here as an aid to discovering lost content. Before moving references ot this section, try to confirm that the resource is really gone, and not just temporarily unavailable. Also, it may be possible to link to an archived version of the original content, perhaps at .

Title/Link Description Note
Source code: [L1 ] The X Resource, Issue 11 (July 1994), pp 205-248: A tutorial Introduction to Tcl and Tk, by Graham A. Mark [L2 ] Tcl 8.0 tutorial by Michael S. Miller, based on the John Ousterhout tutorial, as well as Tcl UDP and a disk usage application. The creator also has some online doc for Tcl UPD and Tcl channels at

dprasad - 2016-06-08 19:54:52

Hi, i have 2 lists list1 = {1 2 3 4 5} list2 = {6 7 8 9 }

i want to merge two lists to a new list which gives a result {1 2 6 3 4 7 5 8 9} it will take 2 element from list1 then 1 element from list2 and when condition finish it will print as it is shown in the above example.

please write a generic code.

Let's move this to TCL programs for beginners after you read it, not very concise but it could be a good basic example:

 set result {}
 set list1 {1 2 3 4 5}
 set list2 {6 7 8 9}
 foreach {eL1a eL1b} $list1 eL2 $list2 {
    if {[info exists eL1a] && $eL1a != ""} {lappend result $eL1a}
    if {[info exists eL1b] && $eL1b != ""} {lappend result $eL1b}
    if {[info exists eL2]  && $eL2  != ""} {lappend result $eL2}
 puts $result


set list1 {1 2 3 4 5}
set list2 {6 7 8 9}
set result [concat {*}[lmap {a b} $list1 c $list2 {
    concat {*}[list $a $b $c]


set result {}
set list1 {1 2 3 4 5}
set list2 {6 7 8 9}
foreach {a b} $list1 c $list2 {
    lappend result $a $b $c
set result [lmap item $result {
    if {$item ne {}} {
        set item
    } else {