Questions tagged [tcl]

Tool Command Language was invented by John Ousterhout as a way to make it easy to write little languages for configuring EDA tools, but it has grown far beyond those humble beginnings to become a general scripting language with built-in asynchronous I/O and Unicode strings while supporting paradigms such as object-oriented programming and coroutines.

Tool Command Language was invented by John Ousterhout as a way to make it easy to write little languages for configuring EDA tools, but it has grown far beyond those humble beginnings to become a general scripting language with built-in asynchronous I/O and Unicode strings while supporting paradigms such as object-oriented programming and coroutines. See the Wikipedia page for Tcl for more information.

The current recommended production release of Tcl is Tcl/Tk 8.6.11 (Dec 30, 2020).

Previous versions of the language are currently relatively common. Tcl 8.5 is widely deployed (current patch version 8.5.18). As is Tcl 8.4 in more conservative deployments (8.4.20 is current, but end-of-lifed there). Use of Tcl 8.4 or earlier is usually not recommended, as it does not receive security-fix support from the Tcl developers.

Naming

You may write the language name as either TCL or Tcl; practitioners tend to prefer the latter on the grounds that it means they don't have to hold the shift key down so long. For pronunciation purposes, either “tee cee ell” or “tickle” are acceptable, depending on audience.

Resources

Books:

Websites:

7056 questions
70
votes
7 answers

Cannot launch Git GUI using Cygwin on Windows

I used to launch Git GUI within my Cygwin console without any problems, but since I updated Cygwin I've got the following error message: $ git gui Application initialization failed: no display name and no $DISPLAY environment variable Error in…
Stijn Vanpoucke
  • 1,395
  • 3
  • 15
  • 29
69
votes
8 answers

How to make a GUI for bash scripts?

I want to make some graphical dialogs for my script but don't know how. I hear something about GTK-Server or something like that. If someone knows how to link Bash with tcl/tk I also be satisfied. Please do not post something like "change to C++"…
lauriys
  • 4,134
  • 7
  • 30
  • 40
64
votes
5 answers

Waiting for background processes to finish before exiting script

How do I make sure that all my background processes have finished execution before I exit my script (TCL/Bash). I was thinking of writing all my background process pids to a pidfile. And then at the end pgrep the pidfile to see if any processes are…
egorulz
  • 1,385
  • 2
  • 15
  • 28
59
votes
3 answers

Get the version of TCL from the command-line?

I'm looking for a very straight-forward way of getting the version of the TCL installed on a machine from the command-line. For most programming languages, something along the lines of languagename -v provides the information that I want. This does…
44
votes
2 answers

List of All Tkinter Events

In Python tkinter module, , and are used to identify mouse button clicks for left, middle and right buttons respectively. Likewise, is used for the return key press. Where can I find a list of all…
mcu
  • 2,622
  • 7
  • 32
  • 58
34
votes
2 answers

Complex number arithmetic in Tcl?

Is there an equivalent to the expr command which works for complex numbers (represented lists of two doubles)? This library provides functions for complex number arithmetic, and this seems to be a useful utility to define the required cexpr…
Vahagn
  • 4,190
  • 8
  • 33
  • 67
29
votes
2 answers

How to set border color of certain Tkinter widgets?

I'm trying to change the background color of my Tkinter app, but for certain widgets it leaves a white border around the edges. For example, this: from tkinter import * COLOR = "black" root = Tk() root.config(bg=COLOR) button =…
jefdaj
  • 1,817
  • 1
  • 19
  • 30
27
votes
5 answers

Why is topdir set to its default value when rpmbuild called from tcl?

I have a tcl script which 'exec' rpmbuild. When doing so, the 'topdir' used by rpmbuild is wrong. I have a .rpmmacros file in my home directory and if I call manually rpmbuild, it works fine, ie. the 'topdir' is not the default one. I added a [exec…
Barth
  • 13,295
  • 17
  • 63
  • 99
26
votes
4 answers

Read Bash environment variable in TCL

How to read a shell environment variable in your Tcl script. So anyone please help me. I am very new in TCL.
galvin Verghese
  • 545
  • 3
  • 9
  • 16
25
votes
3 answers

How do I link the ActiveState distribution of Tcl/Tk to HomeBrew installed Python

I am using macOS 10.12.1 Sierra. I am using Python 2.7.12 installed with brew install python but the IDLE gives the warning WARNING: The version of Tcl/Tk (8.5.9) in use may be unstable. Visit http://www.python.org/download/mac/tcltk/ for current…
Tom Burrows
  • 1,944
  • 1
  • 27
  • 41
25
votes
1 answer

How to update Tcl/Tk in Python?

Tcl and Tk in their version 8.6 have been out now for about six weeks. However, the files that can be downloaded from Tcl have a different folder structure and lack some files such as tk85.lib (or tk86.lib now) compared to the Tcl folder in…
Michael Westwort
  • 864
  • 8
  • 22
24
votes
10 answers

Do a tail -F until matching a pattern

I want to do a tail -F on a file until matching a pattern. I found a way using awk, but IMHO my command is not really clean. The problem is that I need to do it in only one line, because of some limitations. tail -n +0 -F /tmp/foo | \ awk -W…
Sam Alba
  • 811
  • 1
  • 7
  • 10
23
votes
3 answers

TCL string concat

What is the recommended way of concatenation of strings?
Narek
  • 35,407
  • 69
  • 202
  • 359
23
votes
4 answers

Why is modulus different in different programming languages?

Perl print 2 % -18; --> -16 Tcl puts [expr {2 % -18}] --> -16 but VBScript wscript.echo 2 mod -18 --> 2 Why the difference?
bugmagnet
  • 7,233
  • 7
  • 57
  • 121
23
votes
2 answers

Any difference between "send_user" and "puts" in Expect?

It's not clear to me if send_user is the same as puts. Every time I want to send an informative message to the user, I would wonder which one I should use. From Expect's man page, it seems like send_user is the same as puts but then what is…
pynexj
  • 15,152
  • 5
  • 24
  • 45
1
2 3
99 100