tcl Questions
1
Solved
3
In TCL, how to append different content into a single file using the for loop or foreach loop?
2
So I have been trying to find an answer for this for a bit and could not find the answer on the internet. I need to check to see if an environment variable exists. I thought I had the right code bu...
Stereotyped asked 6/5, 2014 at 19:9
3
Solved
There is a TCL script which has multiple procedure definitions with similar name func in different namespaces. Procedures look like this:
proc func {a} {
puts $a
}
All that kind of procedures h...
Confab asked 8/4, 2014 at 8:42
1
Solved
Is there a way in TCL to get the number of parameters that procedure accepts?
For example we have procedure:
proc func {a} {
puts $a
}
I need a way to put in variable the number of parameters t...
Englishism asked 8/4, 2014 at 9:32
3
Solved
I've got a variable that I would like to use as default value for an argument:
proc log {message {output $::output}} {
....
}
Is there a way to do this or need I to evaluate the variable inside...
Apothecary asked 23/6, 2011 at 9:53
1
Solved
I am trying to create a simple notepad like GUI using Perl Tk. I have used the Scrolled widget to create a Text widget with two scrollbars - one on the right and one on the bottom. The place where ...
Circuity asked 24/1, 2014 at 9:28
1
Tcl and Tk in their version 8.6 have been out now for about six weeks. However, the files that can be downloaded from Tcl have a different folder structure and lack some files such as tk85.lib (or ...
Caricature asked 6/2, 2013 at 23:27
1
Solved
How can I force the columns in a Tkinter application window to be of equal width?
The tkdocs website states as follows:
The width of each column (or height of each row) depends on the width or hei...
Peasant asked 8/1, 2014 at 17:35
1
Solved
I try to load a modulefile containing an alias from a bash shell. The tutorial page says the following about the set-alias command:
set-alias alias-name alias-string
Sets an alias or function...
Caelian asked 3/1, 2014 at 9:59
2
Thanks.
But the account and password are needed. So I must send them and then send ovs-vsctl command.
the scripts are something like this:
spawn telnet@ip
expect -re "*login*" {
send "root"
}...
1
How can I configure the listbox component width in a combobox, so that it will fit to longest entry?
The widget width itself (the entry component) can be short, but I'm looking for a way to configu...
Distinguished asked 11/7, 2013 at 8:21
3
TCL: Can Anyone Explain ?: in regular expression
I am getting confusion between ? and ?: .
? means preceding character may or may not be present.
Then I am not understanding what (?:) indi...
1
Solved
Assumption is, this is the script
#!/usr/bin/expect
set a "__test__"
i would like to create a loop inside this script so it can print the value for
$a
with the a number infront of it based o...
1
I just wondering if there is something like set -x as it is present in Bash forTCL which allows me to follow the flow of my script and then help me to debug it.
2
I want to expose the boost::shared_Ptr to Tcl layer using SWIG. but currently I don't know I could Expose this. I found out that SWIG/Lib folder contains the interface file for shared_ptr.i. But in...
3
Solved
We can evaluate the two expression in two possible ways:
set a 1
set b 1
puts [expr $a + $b ]
puts [expr {$a + $b } ]
But why hate experienced Tclers the first one, and consider it as bad pr...
Excurvature asked 3/7, 2013 at 15:9
2
Solved
There is a collection of vertices: [ x1 y1 x2 y2 .. xn yn ]
I would like to change the center of those coordinates. So I try:
proc changeCenter { vertices X Y } {
set myList [list]
foreach elem...
2
Solved
I see the following in a Tcl script:
If { <some_condition> } {
// code here...
} {
// code here...
}
I am assuming this is a special case of if-else syntax? Would just like to get confir...
Shenika asked 17/6, 2013 at 19:14
1
Solved
I want to print a particular column number fields in a file while in TCL script.
I tried with exec awk '{print $4}' foo where foo is filename, but it is not working as it gives error
can't read ...
2
Solved
How do I give input to a Tcl script through the keyboard? Is there any thing like scanf() in C?
Lallage asked 3/12, 2009 at 20:42
1
Solved
I created the map from the item to item handler.
array set handlers {
handleItem1 handlerFunction1
handleItem2 handlerFunction2
}
But handlerFunctions could take parameter.
So below code i...
Mortify asked 29/5, 2013 at 13:11
2
Solved
Is there an equivalent to the expr command which works for complex numbers (represented lists of two doubles)?
This library provides functions for complex number arithmetic, and this seems to be a...
Hearsh asked 1/2, 2012 at 14:38
1
I dont know whats happening but i am not getting the complete output from the remote command executed possibly because expects internal buffer is getting execceded.
proc SendCommands { Commands }...
3
Solved
I am trying to understand this code which is from Tcl documentation
typedef int Tcl_DriverOutputProc(
ClientData instanceData,
const char *buf,
int toWrite,
int *errorCodePtr);
As I know the...
© 2022 - 2024 — McMap. All rights reserved.