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.13 (Nov 22, 2022).

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

Questions:

Books:

Websites:

7879 questions
2
votes
3 answers

Implementation question in web-development

We are testing a DSL modem's web pages (the HTTP server is running on the modem). We have an automation tool that configures various options on the web pages by sending POSTS of the respective web pages We are using TCL (HTTP package) to send…
Vidya
  • 7,717
  • 12
  • 48
  • 75
2
votes
3 answers

TCL: Backslash issue (regsub)

I have an issue while trying to read a member of a list like \\server\directory The issue comes when I try to get this variable using the lindex command, that proceeds with TCL substitution, so the result is: \serverdirectory Then, I think I need…
estradjs
  • 175
  • 2
  • 16
2
votes
3 answers

TCL String Manipulation and Extraction

I have a string xxxxxxx-s12345ab7_0_0_xx2.log and need to have an output like AB700_xx2 in TCL. ab will be the delimiter and need to extract from ab to . (including ab) and also have to remove only the first two underscores. Tried string trim,…
user2902205
  • 69
  • 2
  • 8
2
votes
4 answers

TCL code to replace () with blank line

Hi i am newbie in TCL please help me with code, method anything. There is a string for example (abcgfhdskls12345)HELLO(hikjkflklfk) (bkjopkjjkl)HI(kjkkjjuilpp) i just want to remove everything between () and want to print only Hi and…
user2901871
  • 219
  • 5
  • 6
  • 10
2
votes
0 answers

VTK tcl/tk how can I represent several scalars in different colored planes?

This looks like something simple to do but I am having difficulty in representing different scalar values in different colored planes. I have a file that contains the data of the seasons "dados_solo.vtk" and has the scalar value corresponding to the…
Vitor
  • 145
  • 1
  • 1
  • 5
2
votes
1 answer

Running Expect script on windows

I've the expect script running on linux which I want to run it on windows. I've added #!/bin/sh # \ exec tclsh "$0" ${1+"$@"} package require Expect lines as well at the start. I'm getting 'can't find package Expect' error. where can I get…
asp
  • 649
  • 1
  • 6
  • 10
2
votes
1 answer

TCL: Cannot open a program with "exec" command

Try to open a file with gvim.exe in tcl. I have correctly installed gvim but cannot open it with the following 2 command: exec gvim.exe $file_path exec ./gvim.exe $file_path However, is able to open the file with the following 2 commands: exec…
user2895478
  • 383
  • 4
  • 15
2
votes
4 answers

Way to list all procedures in a Tcl file

Is there any way to list all the procedures(proc) in a myFile.tcl using another tcl file or in the same file.
Ashwin
  • 993
  • 1
  • 16
  • 41
2
votes
1 answer

TCL: logical operator doesn't work in variable defined in regexp

I have a string, I want to check if any strings from an array is a part of it or not: set name abcxyz set array [list abc efg hij] set List [join $array "|"] if {[regexp {($List)} $name]} { ... } I don't want to use foreach loop is because…
2
votes
1 answer

Using `chan pending output` instead of writable fileevent

Yo, I've written a server with a simple protocol: the client sends a line, the server sends a line back in response, repeat. To prevent a client from filling Tcl's output buffer by sending lots of lines but not accepting data back, can I just check…
potrzebie
  • 1,768
  • 1
  • 12
  • 25
2
votes
1 answer

Tcl/Tk always on top

I have a Tcl/Tk application with multiple dialogs which may be visible at the same time. However, I would like to set my “main dialog” (which is defined as top level) to be “always on top”. How do I do this?
HardwareEng.
  • 99
  • 1
  • 14
2
votes
1 answer

Overriding binding in Tcl/Tk text widget

I have these bindings in an application: bind $::app {FileOpen} bind $::app {FileOpen} FileOpen is a proc. I press Ctrl+o in a text widget and FileOpen is launched fine, but first a newline is…
user2371882
2
votes
1 answer

Assigning messages from STDOUT and STDERR to TCL variables

Im looking to get some organization to the output of a command executed in a TCL script in Windows. The situation is that I have a tcl script that eventually calls a perl script. Something like this: The perl script outputs results to both stdout…
radensb
  • 664
  • 1
  • 7
  • 25
2
votes
2 answers

How to make Eclipse DLTK hightlight syntax?

I have installed "Dynamic Languages Toolkit" (tried versions 2.0 and 4.0) on Eclipse Juno, but although I added "Dynamic Languages Toolkit - TCL Development Tools", the Tcl code does not get syntax highlighted, nor do Shell scripts. I read that even…
Holger Jakobs
  • 984
  • 3
  • 11
  • 32
2
votes
2 answers

Use of Tcl in c++ multithreaded application

I am facing crash while trying to create one tcl interpreter per thread. I am using TCL version 8.5.9 on linux rh6. It crashes in different functions each time seems some kind of memory corruption. Going through net it seems a valid approach. Has…
Alok
  • 21
  • 2