tcl Questions
3
Solved
What is the canonical way to pass a list to a Tcl procedure?
I'd really like it if I could get it so that a list is automatically expanded into a variable number of arguments.
So that something l...
3
Solved
What I am trying to do is to:
Create a .exp file, which will read from the *.txt file from the same directory and parse all the content in the text file into a string variable in the expect scrip...
3
Solved
I was creating a Tcl script which will allow me to automate the installation of software. But the problem I am running into is that the software needs some environment variables set beforehand and ...
Shawntashawwal asked 17/4, 2015 at 18:33
4
How to read a shell environment variable in your Tcl script.
So anyone please help me. I am very new in TCL.
Keshiakesia asked 1/4, 2011 at 8:44
2
Solved
I need to get the ASCII character for every character in a string. Actually its every character in a (small) file. The following first 3 lines successfully pull all a file's contents into a string ...
1
Solved
I am trying to use a multi line value as specified as list in ini file, I was able to read sections but not able read to multi line values from a given key.
I have tried to using list manner it co...
4
Solved
I have developed some code, and I'm facing problem with error flagging of the Tcl interpreter on a Linux machine.
#!/usr/bin/tclsh
if {1} {
puts "abc1"
} elseif {} {
puts "abc2"
}
The above c...
Anetteaneurin asked 17/11, 2011 at 6:53
2
Solved
I am having some problems understanding the use of uplevel in TCL. I am reading Brent Welch's Practical programming in TCL and Tk and there is an example in uplevel that I cannot understand. Here i...
Basalt asked 18/7, 2012 at 3:39
2
Solved
I want to redirect the telnet console logs to a file in Linux.
For example:
telnet $someIp > someFile
#ls
#exit
I want the console logs to be saved in the filename someFile. I am using tcl for ...
1
Solved
In Ruby/PERL, I can very easily get the console output of a system command fed into a file. For example:
$k = `ls`
Would input the output of ls into variable $k in PERL (and Ruby).
How can one d...
2
Solved
I want to be able to run a tcl script out of my python script. Specifically, I want to run a tcl script much like this.
I have some knowledge of python and none of tcl.
I have been trying things...
6
Solved
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 "123...
Phocine asked 9/3, 2011 at 5:57
1
Solved
I'm new to expect scripting, I want to write something like this:
set variable;
$variable = expect -exact "\/----Enter Password----\\"
while { != $variable } {
send -- {^[-}
}
I want to ...
Aronarondel asked 12/12, 2014 at 19:1
4
Solved
I have a question about if statement in tcl of the following code:
if {(($number == 1)&&($name == "hello")) || (($number == 0)&&($name == "yes"))} {
#do something here
}
The abo...
Lionel asked 29/6, 2012 at 11:5
1
Solved
I'm trying to speed up debugging. In a large trace I'm search for particular values of a signal. Im using QuestaSim 10.0b under linux.
I already found out that can be done in Modelsim/QuestaSim wi...
2
Solved
I have a string, and I want to check whether it begins with a certain character (# in this case). I'd like to know the most efficient way of doing this!
What I'm thinking of is if {[string compare...
Gerlachovka asked 29/7, 2012 at 0:49
3
Solved
i am having a following code:
proc testList {setupFile ""} {
if {$setupFile == ""} {
set setupFile location
}
}
proc run {} {
puts "$setupFile"
}
I am getting syntax error. I know if i decla...
Odonnell asked 16/4, 2012 at 18:10
1
I've written a expect function to get the output of a command and my code is like below
proc do_cmd {cmd id} {
set spawn_id $id
send "$cmd\r"
expect "$cmd\r"
expect {
-re "\n(.*)\r\n" {return...
3
Solved
I am doing my Internship and the internship requires i learn and practice TCL - OO so i have been hunting for tutorials, examples, books on TCL - OO but i cannot find anything, So i would appreciat...
Polydipsia asked 24/8, 2012 at 9:16
1
Solved
I want to print the contents of an array in Tcl (for debugging). The order is unimportant, I just want every value printed.
How do I do it?
Mehetabel asked 1/8, 2014 at 15:38
2
Solved
set d(aa1) 1
set d(aa2) 1
set d(aa3) 1
set d(aa4) 1
set d(aa5) 1
set d(aa6) 1
set d(aa7) 1
set d(aa8) 1
set d(aa9) 1
set d(aa10) 1
set d(aa11) 1
set regexp "a*\[1-9\]"
set res [array names d -glo...
3
Solved
$arg=TEST #### Requested, NOT AVAILABLE psy #;
I have a string above where the # is dynamically generated.
I have to use a function in tcl to do a string replacement.
Basically I need to remove t...
Hyperion asked 10/4, 2012 at 18:54
5
Solved
Is there a possibility to get the full path of the currently executing TCL script?
In PHP it would be: __FILE__
Weigle asked 1/10, 2010 at 11:8
6
Solved
Often when reading about Tcl (e.g. http://antirez.com/articoli/tclmisunderstood.html) you read that "everything is a command". Sometimes you also hear how other languages are, like Tcl, "command la...
Archibaldo asked 25/9, 2009 at 16:24
3
Solved
Maven is for building and managing any Java-based project. But what happens if a project is in a scripting language?
All maven can do now with TCL is copy the files around and put them in the rig...
© 2022 - 2024 — McMap. All rights reserved.