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
1 answer

Read all input in event handler?

Is the readable file event triggered by a channel becoming readable, or by it being readable? In a file event handler, do I have to read all available input to get a new event triggered in the future? Or can I read only 1 character and return, and…
potrzebie
  • 1,768
  • 1
  • 12
  • 25
2
votes
1 answer

Disable Tcl's input buffering?

Does Tcl do any internal input buffering that's out of the script writers control? Will the following code possibly waste entropy (read more than 1 byte), and if so, how can I prevent it? set stream [open "/dev/srandom"] chan configure $stream…
potrzebie
  • 1,768
  • 1
  • 12
  • 25
2
votes
0 answers

how to debug remotely TCL codes from solaris / linux ? and is there any eclipse plugin for doing this?

I was trying to remote debug the (i)TCL code written for solaris10 and SuSE10. I tried active tcl and remote wrapper method. But the iTCL part I was not able to debug. Is there any method so that I can debug the tcl codes remotely?
Arjun
  • 23
  • 2
2
votes
2 answers

TCL: loops How to get out of inner most loop to outside?

In the below code once I hit check_access as 0 how do I preserve the value and hit the if condition below ($check_root && $check_access) . Break will only terminate the inner loop. But the other loops will continue as per me. } else { …
Zuckerberg
  • 205
  • 6
  • 15
2
votes
4 answers

Convert seconds to hours minutes seconds format

I need to convert time in seconds to HH:MM:SS.mm format. The seconds input is being read from an embedded device, and it is a double of the format seconds.millseconds. I tried the following conversion code but it fails: set cpu_time…
Praetorian
  • 106,671
  • 19
  • 240
  • 328
2
votes
1 answer

How to send the payload as it is using tcl udp package

I want to send the payload which is 6 bytes of hex : "8000000004d2" using udp package provided by tcl. I am able to send it and on the receiver pc i am able to read the same data. But in the wireshark capture it shows 12 bytes of payload, because it…
user1497818
  • 375
  • 1
  • 7
  • 16
2
votes
2 answers

How to efficiently get rest of a Tcl list starting from an index?

I would like to get all elements following a particular index of a list. This could be written as: set foo {0 1 2 3 4 5 6 <...> n} puts [lrange $foo 1 [llength $foo]] However, it seems like a waste to compute the length of the list. It would be…
WilliamKF
  • 41,123
  • 68
  • 193
  • 295
2
votes
1 answer

Get the output from Tcl C Procedures

I have a C shell that usually calls Tcl routines using Tcl_Eval. Normally I was fine with just executing what the user typed and getting some status as a result. However, now I need to receive the actual stdio output from the command that user…
ilya1725
  • 4,496
  • 7
  • 43
  • 68
2
votes
7 answers

Which ingame scripting language should I support?

The ingame script will control NPC/AI logic. If I were to implement ingame scripting feature which language should it support? JavaScript (builtin browser support) TCL (interpreter in java) Lua (popular) Squirrel CSI Other Keep in mind my…
zproxy
  • 3,509
  • 3
  • 39
  • 45
2
votes
2 answers

tcl expect dollar sign anchor to match last character not working

In TCL Expect do I need to escape the $ to use it as an anchor? For example to match t if it occurs in last position should be: expect t$ But this does not work, I suspect because TCL is interpreting the $. I tried all of the following without…
wat
  • 53
  • 1
  • 4
2
votes
2 answers

stray characters coming after splitting the list in tcl

More often than not I get characters like "{\\ {" in my list which is the result of simple list which is concatenated or split by space . Just looking for the reason behind these characters. I know that the backspace followed by a special sign…
Zuckerberg
  • 205
  • 6
  • 15
2
votes
1 answer

Passing multiple arguments to perl script from expect/tcl

I have some troubles with the below script. proc checkUser {userip} { set search "show users | include " set search_cmd [concat $search $userip] exp_send "$search_cmd\r" expect { -re "Vi.*" { set oui…
SneakyMummin
  • 683
  • 1
  • 11
  • 30
2
votes
1 answer

Hanging Window When Using TCL Sockets

I am using TCL socket command to communicate between two TCL/Tk applications say A and B where both have a associated GUI. The server on B basically accepts commands from A and returns the result of the execution. The problem is that the GUI for B…
balaji kommineni
  • 127
  • 2
  • 11
2
votes
1 answer

How to run a TCL script in Python?

Possible Duplicate: Know any creative ways to interface Python with Tcl? In python , I need to put some values as input into a TCL script, let it run, then use its outputs. how should I do that? thanks
Sonic
  • 85
  • 1
  • 10
2
votes
3 answers

Sort a tcl array and get the array key.

Hi i have an array with basic key-value pair and i want to sort it and then get the keys. The array contents are something like this: arrVal { 123adf45ad ABCD.1 aldfhr435d ABCD.9 lkh45q9er4 ABCD 1234dartf4 ABCD4 } So…
Puneet Mittal
  • 532
  • 1
  • 15
  • 24