Hi,
I found tcl exec command returns string from stdout first then stderr. For example, my following "test script" generates messages in this order:
puts "test started"
puts stderr "some non-fatal error goes to stderr"
puts "test passed"
Then I execute the script like this:
set ret [ catch { exec sh -c $cmd } msg ]
and what I get...
How do you create your status line at the bottom of your window? An inactive entry does not look very nice. What other options are there?
Is possible to integrate a progress bar which is visible only on demand?
(I am using tk and ttk from within R.)
EDIT: Now here is my second version, which works fine for me, but I would like to disp...
I can run this expect script just fine using root or my own user account, however when I run it with cron, I always get an error. The OS is Ubuntu 8.04.
Error email is as follows,
Date: Thu, 26 Aug 2010 11:50:01 -0400
From: root@supa (Cron Daemon)
To: root@supa
Subject: Cron <root@supa> /home/myusername/bin/uploadmyip
myserver.com
can...
I have a nice fully functioning module (wrtten using tcl/cpp) it works fine.
I want to use ramdebugger to debug scripts using that module
When I enter
load mylib.so
command1_from_lib xx
command2_from lib yy
If (say) command2 returns an error then ramdebugger dies
[paul@paul-es5 ramdebugger7.7.1]$ ./ramdebugger
alloc: invalid bloc...
At csh you can do
set ignoreeof
or at bash tou can do
export ignoreeof=1
and this will make csh/bash to ignore EOF, i.e. it will not exit on Ctrl+D, or when it reaches the end or file.
Is there a way to make the same with tclsh ?
Is there a way to make tclsh not to exit when it reaches the end of file ?
...
I have a set of radiobuttons (say, with choices 1 and 2) and need to show some widget based off of the user's choice. For example, if they chose 1, I would show them a labelframe with several radiobuttons; whereas, if they chose 2, I would show them a labelframe with some buttons. In either case, the resulting content would be shown in t...
I tried the following code:
set exp {elem[0]}
set temp {elem[0]}
regsub $temp $exp "1" exp
if {$exp} {
puts "######### 111111111111111 ################"
} else {
puts "########### 0000000000000000 ############"
}
of course, this is the easiest regsub possible (the words match completely), and still it doesnt work, and no sub...
When deploy java app on linux, we don't need to install anything, all third-party libs are jar files and we only update classpath in script file. But java needs jre which is quite large.
So is there any other language supported by linux can do that? By default our server only support perl/python/tcl, no gcc available, sigh.
...
Is it possible to create some kind of fullscreen mode (e.g. no window title bar) in Tk applications?
...
A list in lisp is a series of cons cells, but in Tcl, a list is a string with whitespace separating the elements. For translating code from lisp to tcl, one might simply take lisp lists and translate them to Tcl lists. However, this runs into trouble with side effecting cons cells not coming across to the Tcl code. For example, consid...
When launching tclsh and typing this:
close [open "|tclsh" w]
it works fine.
But, when in ~/.tclshrc you have package require Tk, the same line makes tclsh to HANG!
The same issue is with all GUI packages like Tk, Itk, Img, Iwidgets, however with not GUI packages like Itcl, it worsk fine.
How can I fix this issue? The point is to m...
I was trying to use iwidgets in some GUI and I want to make combobox non-editable. As per activetcl documentation, the -editable option is mentioned for combobox and yet it is not working.
combobox $frm_sat1.c2 \
-textvariable [itcl::scope type] \
-state normal -entries {"1 opt" "2 opt"} -editable 0;
help me!
...
Hello,
I want to create a simple Console in Tcl/Tk
I have two problems. First changing every * with a [glob *] but also, when my entry contains "ls -a" it doesn't understand that ls is the command and -a the first arg.
How can I manage to do that ?
Thanks
proc execute {} {
# ajoute le contenu de .add_frame.add_entry
set valu...
Hi..
while executing
$expect filename.exp user pwd ip
I got the error
could not execute "ssh -l user ip": no such file or directory
The contents of filename.exp are this:
#!/opt/sfw/bin/expect -D
set OMC_Usr [lindex $argv 0]
set OMC_Pwd [lindex $argv 1]
set OMC_IP [lindex $argv 2]
set cmd "ssh -l $OMC_Usr $OMC_IP"
spawn $c...
I've an executable hosting tcl interpretor, and a library hosting a extension.
I want to be able to build the library dynamically (loaded with Tcl's load)
or statically (single executable, or so loaded implicitly).
The Executable code:
#ifdef GO_STATIC
extern int My_ext_Init(Tcl_Interp* interp);
Tcl_StaticPackage(interp, "my_e...
Expect seems to be a very powerful automation tool: http://www.nist.gov/mel/msid/expect.cfm
Is there a Ruby equivalent to that tool?
...
I am amazed by how Expect (TCL) can automate a lot of things I normally could not do.
I thought I could dig deeper into Expect by reading a book, but before I do that I want to ask if there are other solutions/languages that could do what Expect does?
Eg. I have read that people compare Expect with Awk and also Perl.
Could Awk and Per...
It works great when I use expect interactively like this:
root@vagrantup:/home/vagrant> expect -i
expect1.1> spawn screen -x
spawn screen -x
3195
expect1.2> send "ls\n"
expect1.3> exit
But the same commands used in a file:
spawn screen -x
send "ls\n"
exit
Only works sometimes, eg. 1/10 time every time I execute the file. It's reall...
Hello, I am a total expect noob.
I am writing a expect script for a test case where I want to count the number of occurrences of the string "Ok" and do an action for every occurrence from the following output:
Reloading configuration on all nodes
Reloading configuration on node 1 (node1-c5)
OK
Reloading configuration on node 2 (node2-c...
Hi
Is it possible to call Tcl procedures that have function pointers (or callback functions) from Python?
I am using Tkinter to call Tcl procedures from Python.
Python Snippet :
proc callbackFunc():
print "I am in callbackFunc"
cb = callbackFunc
Tkinter.Tk.call('tclproc::RetrieveInfo', cb)
Tcl Snippet :
proc tclproc::RetrieveI...