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

nohup command won't work with tcltest

I am trying to use nohup to run tcltest script overnight. However, the tcltest seems to disable nohup's function and always terminate my tcltest process after I close the shell. Example, [root@demo test]# cat 0199.test package require tcltest …
2
votes
1 answer

tcl cannot see manpage in tclsh

I've just installed Tcl/Tk 8.5.11 on my Ubuntu 12.04.3 64bit. I installed with the following two commands: %sudo apt-get install tcl %sudo apt-get install tk Now I can use tclsh and almost everything is fine. The only problem is that I cannot…
2
votes
1 answer

invalid command name "zlib" while executing http::geturl

I'm on TCL 8.5 (can't upgrade) and running version 2.7.7 of the HTTP package. I'm calling a library which appears to be using the following http::geturl command to download an image which has been gzipped: http::geturl $url -headers {Accept-Encoding…
2
votes
1 answer

Non editable box with tcl tk and R

I am looking for some way to forbid users to change value in a text box with tcltk and R. Here is what I have done : I want to forbid users to change the value in the first box. library(tcltk) tt <- tktoplevel() v <- tclVar("32 200 700") entry.1…
David
  • 4,785
  • 7
  • 39
  • 63
2
votes
4 answers

Need Help Regarding Regular Expression in TCL

Can Anyone help me "Execution flow" of the follwing Regular Expression in TCL. % regexp {^([01]?[0-9][0-9]?|2[0-4][0-9]|25[0-5])$} 9 1 (success) % % % regexp {^([01]?[0-9][0-9]?|2[0-4][0-9]|25[0-5])$} 64 1 (success) % regexp…
user2720323
  • 277
  • 3
  • 6
  • 11
2
votes
1 answer

Looking for a GUI application to enter linux commands

I am looking for a GUI console where I can enter linux commands in an entry widget and the result will be output in a text area widget. Is there is such software available? Something like this: A console programs like gnome-terminal or xterm, the…
milarepa
  • 759
  • 9
  • 28
2
votes
0 answers

Grid and ungrid plot using R and tcltk

I plot data in a tcl tk window like this. a <- tktoplevel() b <- tkrplot(a, function()plot(cars, col="red")) tkpack(b) In my window, I use check button to put or remove grid to the plot. require(tcltk) require(tkrplot) a <- tktoplevel() tkbind(a,…
David
  • 4,785
  • 7
  • 39
  • 63
2
votes
3 answers

Match a string with regexp

I am having a string like -------- AGG x y PORT-16385-INFO ----------------------------+ I want to extract the "AGG x y PORT-16385-INFO ". However this pattern in not same. It can have any number of spaces inbetween . Help me with the regexp to…
Sumit
  • 1,953
  • 6
  • 32
  • 58
2
votes
1 answer

regexp last occurance of a pattern to end of string in tcl

I have a string like AVPs_List,Vendor_Specific_Application_Id,3,AVP.Vendor_ID,0,AVP.Header,AVP.Code I want to regexp / regsub to get a output like AVPs_List,Vendor_Specific_Application_Id,3,AVP.Vendor_ID Actually I want to subtract the…
Codename_DJ
  • 553
  • 1
  • 11
  • 40
2
votes
3 answers

What way is faster to populate a list with unique values in Tcl?

I want to create a list of unique values. The values are taken from different sources and. There are 2 ways to populate my final list. Put all the values in and then perform lrmdups: set finalList [list ] foreach selcetion $selectionList { …
SIMEL
  • 8,745
  • 28
  • 84
  • 130
2
votes
1 answer

How to mport RGL plot in a tcl tk window with R

I want to display an interactive 3D plot in a TCL TK window. I wonder if it is possible. Here is a code poping up a new window (device) doing that. library(rgl) attach(mtcars) plot3d(wt, disp, mpg, col="red", size=5) The problem is I can't add…
David
  • 4,785
  • 7
  • 39
  • 63
2
votes
1 answer

In an expect script, how do you allow the interact return string to print to STDOUT?

Example would help: #!/usr/bin/expect spawn $env(SHELL) expect "\$ " interact KILL return send "exit\r" expect eof So in the above, when it gives control to me via interact, I can issue any command I want. But if I start to type "KILL", it seems…
Kevin
  • 1,489
  • 2
  • 20
  • 30
2
votes
1 answer

Strange result when calling 'winfo children' on implicitly generated toplevel window with a menubar

Sample code: package require Tk menu .mymenu . configure -menu .mymenu puts [winfo children .] Using Tcl 8.6, this prints out: .mymenu .#mymenu I'm confused where the .#mymenu identifier comes from. Note that when using this same code on an…
Andrej Mitrović
  • 3,322
  • 3
  • 20
  • 33
2
votes
2 answers

How to load a dll in Tcl?

What I have tried (running Tcl and Tk 8.6.0 on Windows): load D:/toot/bar/em.dll load "D:/toot/bar/em.dll" load D://toot//bar//em.dll load "D://toot//bar//em.dll" load D:\toot\bar\em.dll load "D:\toot\bar\em.dll" load D:\\toot\\bar\\em.dll load…
A T
  • 13,008
  • 21
  • 97
  • 158
2
votes
1 answer

tcl 8.6 package in 8.4

In Tcl/Tk 8.6 has a Ttk feature known as notebook which I would like to implement into my program. However, I need the package to be able to utilize this feature. I have to use 8.4 since one of the dlls that we are using is ONLY compatible with…
ButtahNBred
  • 432
  • 1
  • 8
  • 24