View on GitHub


Embed Tcl/Tk scripts in Common Lisp

Download this project as a .zip file Download this project as a tar.gz file


Tcl/Tk provides a powerful GUI library with a BSD-style open source license. It is a combination of the scripting language Tcl and the cross-platform widget toolkit Tk.

Package clTcl provides an interface to Tcl/Tk via Tcl scripts embedded into Common Lisp. Program your GUI with Tcl as embedded language. Scripts can be run by choosing one of the various Tcl/Tk interpreters. Deployment is possible for many systems.

Hello World

The following fragment is the obligatory Hello World.

  #TCL[package require Tk
       wm protocol . WM_DELETE_WINDOW {exit}
       label .message -text "Hello World!"
       pack .message])

Function event-loop starts the Tcl/Tk interpreter, executes the given script and starts listening for events to dispatch. It is typically used as application top loop.

The Tcl script is embedded with syntax #TCL[ ... ]. At the dots any literal Tcl script can occur.


The installation page describes the requirements, installing clTcl, choosing a Tcl/Tk interpreter, troubleshooting.

The manual explains how to use the clTcl package. All functions are specification of the clTcl package.

Finally there are some examples.


I have run it successfully with ABCL, CLISP, SBCL, LispWorks, CCL and CMU on GNU/Linux and with ABCL, CCL, CLISP and LispWorks on Windows. All combinations worked for various Tcl/Tk interpreters. Other implementations and combinations should work without many problems.


This software has an MIT license.