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
23
votes
2 answers

The Simplest Steps to Converting TCL TK to a Stand Alone Application

After running into major compatitiblity problems with C#, ASP.NET, MS Access, Linux, and Mono, I've decided to program in a language that is cross-platform, open source, and compatible with embedded databases that are also compatible with many…
DFM
  • 473
  • 4
  • 14
22
votes
4 answers

What is the difference between spawn and exec?

I'm learning to write a TCL (expect) scripts and I notice that some examples show to use spawn, while others show the command exec. I tried googling, but can't find what is the difference? Suppose I call 'exec' in a middle of a long expect script,…
Milan Babuškov
  • 55,232
  • 47
  • 119
  • 176
22
votes
2 answers

How to get Command history by cursor key in Linux tclsh

Can get the command history by using cursor key (like up arrow key) in TCL shell (tclsh). I am running tclsh on fedora with linux version 2.6.21.
Adi
  • 1,439
  • 3
  • 18
  • 27
22
votes
3 answers

How to concisely concatenate strings in Tcl?

I can easily concatenate two variables, foo and bar, as follows in Tcl: "${foo}${bar}". However, if I don't want to put an intermediate result into a variable, how can I easily concatenate the results of calling some proc? Long hand this would be…
WilliamKF
  • 36,283
  • 61
  • 170
  • 271
21
votes
6 answers

TCL remove an element from a list

How te remove an element from TCL list say: which has index = 4 which has value = "aa" I have Googled and have not found any built-in function yet.
Narek
  • 35,407
  • 69
  • 202
  • 359
21
votes
7 answers

TCL : Concatenate a variable and a string

Assume we have a variable 'a' set to 12345 : set a 12345 Now how do i set a new variable 'b' which contains the value of 'a' and another string say 9876 workaround is something like set a "12345" set u "9876" set b $a$u but i dont want to specify…
user651006
  • 213
  • 1
  • 2
  • 5
21
votes
6 answers

Install tkinter in python3.6 on Ubuntu

+--------+-----------------------------------+ | OS | Ubuntu 12.04 | +--------+-----------------------------------+ | Python | 2.7, 3.2 and source installed 3.6 | +--------+-----------------------------------+ Since there…
lapin
  • 404
  • 1
  • 5
  • 11
20
votes
4 answers

Understanding the usage of braces

I'm learning Tcl/Tk and am confused on the usage of curly braces in tcl. To me it seems to be used to both indicate scope and declare strings! Is this a bug (or feature)? Is my interpretation correct?
jack the lesser
  • 661
  • 1
  • 7
  • 15
19
votes
8 answers

IDLE warns against an old TCL version even though I've installed a newer version

I have installed ActiveTcl8.6.1.1.297588-macosx10.5-i386-x86_64-threaded on my OS X 10.9.1 . However, when I launch IDLE by running idle3 from the terminal, the following warning shows in the IDLE window: Python 3.3.3 (v3.3.3:c3896275c0f6, Nov 16…
Evan Aad
  • 5,167
  • 4
  • 21
  • 32
18
votes
3 answers

General string quoting for TCL

I'm writing a utility (which happens to be in python) which is generating output in the form of a TCL script. Given some arbitrary string variable (not unicode) in the python, I want to produce a TCL line like set s something ... which will set TCL…
greggo
  • 2,511
  • 1
  • 20
  • 19
18
votes
1 answer

Python embeddable zip: install Tkinter

Python embeddable zip comes without pip and Tkinter. It is easy to install pip with get-pip.py in the embeddable zip. How can we install Tkinter too (assuming we do not have an existing Python installation in the same machine)?
antonio
  • 9,285
  • 10
  • 59
  • 113
18
votes
7 answers

error: curl: /usr/local/lib/libcurl.so.4: no version information available (required by curl)

Hello i have this error when i run curl from tcl error: curl: /usr/local/lib/libcurl.so.4: no version information available (required by curl) curl --version curl 7.40.0 (x86_64-unknown-linux-gnu) libcurl/7.40.0 OpenSSL/1.0.1f zlib/1.2.8…
user4457475
18
votes
2 answers

Threads and tkinter

I've heard that threads in Python are not easy to handle and they become more tangled with tkinter. I have the following problem. I have two classes, one for the GUI and another for an infinite process. First, I start the GUI class and then the…
Martin DLF
  • 201
  • 1
  • 3
  • 7
18
votes
3 answers

Know any creative ways to interface Python with Tcl?

Here's the situation. The company I work for has quite a bit of existing Tcl code, but some of them want to start using python. It would nice to be able to reuse some of the existing Tcl code, because that's money already spent. Besides, some of…
Jay Atkinson
  • 3,199
  • 2
  • 24
  • 40
17
votes
3 answers

Should I use Perl/Tk, Tcl::Tk or Tkx for a Perl GUI?

I really like Perl/Tk, but have come to the opinion that it's DOA. I think Tcl::Tk and Tkx are better solutions. Assume I drop Perl/Tk. Is the "most supported" route to go with Tcl::Tk (which hasn't been updated since 2007, and whose author…
xcramps
  • 1,201
  • 9
  • 9