tcl Questions
1
Solved
is it possible to run conditional commands using TCL's ternary operator?
using if statement
if {[string index $cVals $index]} {
incr As
} {
incr Bs
}
I would like to use ternary operator a...
Dev asked 13/3, 2016 at 2:18
3
Solved
I am having all the libraries written in TCL. I want to create a GUI in Python which will have few buttons and other options. In the start TCL shell will open. When I will click the buttons, respec...
4
I am trying to write a module file for a program that creates a python virtualenv. In order to start the virtualenv, it needs to first run /programs/program-env/bin/activate. How do I do this in a ...
Seleneselenious asked 5/4, 2014 at 18:40
0
7
Solved
I used to launch Git GUI within my Cygwin console without any problems, but since I updated Cygwin I've got the following error message:
$ git gui
Application initialization failed: no display name...
Apiculture asked 22/2, 2012 at 10:57
0
I need to gather some statistics from a network switch and would like to use an expect script to output the data to a file. I would like to run this script as a cron job and have the data appended ...
Epicycle asked 29/1, 2016 at 2:42
1
Solved
I am doing something like this:
#!/usr/bin/expect -f
if {$out != ""} {
send_user $out
}
But it doesn't work. Error message:
can't read "out": no such variable
while executing
"if {$out != ""...
4
Solved
I am writing a script using expect in which I have to rlogin to some host & after that I need to send some commands. Now I want to exit to that host and relogin again to some other host and sen...
3
Solved
I'm looking for a very straight-forward way of getting the version of the TCL installed on a machine from the command-line. For most programming languages, something along the lines of
languagenam...
Studding asked 8/2, 2012 at 19:30
2
Solved
I need to strip leading and trailing whitespace from a string in TCL. How?
Maletta asked 11/1, 2011 at 12:20
2
Solved
set var1 A
set var2 {A}
Is it possible to check if variable is list in TCL? For var1 and var2 llength gives 1. I am thinking that these 2 variables are considered same. They are both lists with ...
2
Solved
this is a strange question and i searched but couldn't find any satisfactory answer.
I have a compiled tcl file i.e. a .tbc file. So is there a way to convert this .tbc file back to .tcl file.
I...
Mobley asked 31/1, 2013 at 18:58
3
Solved
Given this proc:
proc foo {{aa "a"} {bb "b"} cc} {
echo $cc
}
Is it possible to call proc foo and only pass a value for cc? Also, is it possible to pass a value to cc explicitly by name?
Every...
Oolite asked 19/3, 2015 at 16:57
1
say the file path is saved as an variable f
puts "$f"
Then outcome is
/home/usr/testfile.txt
I want to remove everything but the name, 'testfile' and save it in a new variable.
Spectrogram asked 22/9, 2015 at 22:51
4
Solved
I am looking for recommendations for a browser based TCL sandbox to practice some proof of concept code.
Google search just brings up books and online courses, but I want to try out some cod...
Slab asked 26/2, 2011 at 0:50
2
Solved
I'm using expect to start an application on my server:
#!/usr/bin/expect
set timeout -1
spawn "bin/start-all.sh"
expect {
-re "Found MongoDB in" { send "y\r"; exp_continue }
-re "Found Hadoop ...
Hibernaculum asked 29/7, 2013 at 4:43
2
I want to implement the expect "interact" command using java. In expect, it's possible to open an ssh session, authenticate and, then, use the "interact" command to give the control back to the use...
1
Solved
I get a warning message while trying to create exectable file using pyinstaller. This warning appeared after installing Pillow. Previously i nevre got any warnings and was able to make it through.
...
Acromion asked 5/8, 2015 at 13:40
1
Solved
Say I have a file, named ./ko
I want it's full path, which can be (for example) /foo/bar/ko
In Perl, one just does
File::Spec->rel2abs("./ko")
In Ruby, it is:
File.expand_path("./ko")
How ...
1
Solved
I want to make automation script like
auto rpm installation
long packages installation ( pkgs list with many question in the progress )
auto answering on application installation questions
W...
1
Solved
I'm working on an engineering application, and the interface is written in TCL TK.
Everything went fine until I need to use a (extremely) large array. 370.000.000 of elements, each element from 2...
3
Solved
Similar to Can I find a filename from a filehandle in Perl? but in Tcl.
I plan to cache filename-filehandle associations anyway, so I'm asking purely out of curiosity--particularly of the "operati...
Berber asked 28/2, 2012 at 17:2
7
Solved
I am having trouble in Tcl using numbers with leading zeros. I am parsing some numbers that can have leading zeros, such as "0012", which should be interpreted as the integer "twelve".
$ tclsh
% s...
2
Solved
When i try to run the following expect script, it just finishes running instead waiting for user input. Could someone tell me what i am doing wrong?
#!/usr/bin/expect
puts -nonewline stdout "Enter...
Lemar asked 30/4, 2012 at 15:14
3
Can anyone let me know the difference between upvar 0 and upvar 1 in TCL, how we can use in real time. Kindly, if someone explain with example, it makes me more clear.
© 2022 - 2024 — McMap. All rights reserved.