Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Recent content by ulis

  1. ulis

    Sendin file with SFTP

    Not a solution but did you tried to print the pipe handle (puts $pipe) to see if all is as expected? HTH ulis
  2. ulis

    Beginner ?: How to know actual path to imported package.?

    From the Tcl manual: info loaded ?interp? Returns a list describing all of the packages that have been loaded into interp with the load command. Each list element is a sub-list with two elements consisting of the name of the file from which the package was loaded and the name of the package...
  3. ulis

    Extension in Tcl with C

    Try the Tcler's Wiki: http://wiki.tcl.tk/C+Extension In particular: Hello World as a C extension HTH ulis
  4. ulis

    Selection in multiple listbox widgets

    You need to change the -exportselection option value: listbox .lb -exportselection 0 HTH ulis
  5. ulis

    TCL error

    Seems to me that you did some mistake with the switch syntax. The switch command can use two syntaxes. The error message said that you used the first. Here is a correct use of this syntax: switch -glob -- $mode \ { start { return ""; # a comment } run { # a comment...
  6. ulis

    How do I use ssh to run a program?

    Did you tried //lx1? (this is the standart addressing syntax for a net node) set command "exec ssh //lx1 /mydir/myprogram $myvariable" HTH ulis
  7. ulis

    Get full command line, not just argv

    If you mean the original string, the answer is no. But if you only want the original arguments of the command, you have access to some global variables: argc The number of arguments to tclsh or wish. argv Tcl list of arguments to tclsh or wish. argv0 The script that tclsh or wish started...
  8. ulis

    Error messages redirect.

    All you need is: cmd >& fileName or exec cmd >& fileName More at http://www.tcl.tk/man/tcl/TclCmd/exec.htm#M14 HTH ulis
  9. ulis

    nested variable expansion in namespace

    You're near to win John ;-) set c 2 set b(2) 1 set a(1) "Hi there" puts stdout "$a($b($c))" ulis
  10. ulis

    nested variable expansion in namespace

    If you want objects, may this is more simpler for you: array set ::objects {} # create a node set departement R&D set node $department.//Alice set ::objects($node.address) $ip # add user lappend ::objects($node.users) $user1 # add application lappend ::objects($node.appli)...
  11. ulis

    Problem with format in TCL 8.4

    Is this what you need? set hexIP 80010101 set a1 [string range $hexIP 0 1] set a2 [string range $hexIP 2 3] set decMask [expr 0x$a1].[expr 0x$a2].255.255 puts $decMask 128.1.255.255 HTH ulis
  12. ulis

    nested variable expansion in namespace

    Not sure to understand: However, is there no way to nest or recursively decompose variable expansion based on brase or parenthetical grouping and order? Maybe this can help you? set cname ::x::y::z::name set spaces [lrange [split [string map {:: \0} $cname] \0] 1 end-1] puts $spaces x...
  13. ulis

    Tcl/Tk script-start by double click instead of calling from CLI

    wish is the windowed shell of Tcl. Try tclsh if you don't want a window. More on tclsh at http://wiki.tcl.tk/tclsh HTH ulis
  14. ulis

    nested variable expansion in namespace

    I think that you need that: foreach x [namespace children ::xComputer] { puts [set ::xComputer::$x::HomeLAN] } It seems that Tcl is not able to substituate inside the namespace part of a qualified name. A last word: set a returns the value of the variable a (if a is defined) More on...
  15. ulis

    return boolean value

    You example is perfect but $ns at $now getbool is an extension that I never seen. Boolean values are 0 and 1 (0: false, 1: true) To set a boolean value in a procedure: proc setBoolean {myArg} \ { ... set boolean 1 return $boolean } To wait for a random delay: set...

Part and Inventory Search

Back
Top