Version 1 of namespace children example

Updated 2009-05-27 09:24:16 by LGT

An example to namespace children command :

        puts [info patchlevel]

        set tclVersion [package require Tcl]

        puts "Tcl ($tclVersion)"
        puts [lsort [namespace children]]

        set tkVersion [package require Tk]

        puts "Tk ($tkVersion)"
        puts [lsort [namespace children]]

        exit


        $ tclsh namespaces.tcl
        8.4.17
        Tcl (8.4)
        ::activestate ::platform ::tcl
        Tk (8.4)
        ::activestate ::auto_mkindex_parser ::critcl ::dom ::msgcat ::pkg ::platform ::tcl ::tk ::vfs ::xml

        $ tclsh85 namespaces.tcl
        8.5.7
        Tcl (8.5.7)
        ::activestate ::platform ::tcl
        Tk (8.5.7)
        ::activestate ::auto_mkindex_parser ::msgcat ::pkg ::platform ::tcl ::tk ::ttk

Category Introspection