Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Determining available packages?

116 views
Skip to first unread message

jerry...@gmail.com

unread,
Oct 13, 2005, 7:38:40 PM10/13/05
to
Does anyone have a script that will return a list of
*all* available packages?

I have about 4 different versions of tcl/tk on various
computers and keeping track of what is available is
getting sticky :)

Thanks

Jerry

Jeff Godfrey

unread,
Oct 13, 2005, 7:51:40 PM10/13/05
to
<jerry...@gmail.com> wrote in message
news:1129246720.6...@g44g2000cwa.googlegroups.com...

> Does anyone have a script that will return a list of
> *all* available packages?

Have you tried...

package names

Jeff


jerry...@gmail.com

unread,
Oct 13, 2005, 9:58:28 PM10/13/05
to
Yes,
I started a tclsh terminal session and the command
"package names"
yielded only Tcl.

However after I did a "package require <anypackage>"
all (I hope) package names showed when I did a
"package names"

I guess it needed a kick start to build the data structures

Thanks,

Jerry

Helmut Giese

unread,
Oct 14, 2005, 5:53:15 AM10/14/05
to

Hi Jerry,
go to http://mini.net/tcl/689 and look for lspackages. It's
marvellous.
HTH
Helmut Giese

jerry...@gmail.com

unread,
Oct 14, 2005, 10:44:07 AM10/14/05
to
Helmut,

Thank you "lspackages" does the job quite nicely.

Jerry

Bob Techentin

unread,
Oct 15, 2005, 2:17:49 AM10/15/05
to
<jerry...@gmail.com> wrote

Kind of a "kick start." The [package names] command will return a list of
package names that Tcl knows about. At startup, the interpreter only knows
about the Tcl package. If you try to require a package that Tcl doesn't
know about, then it runs all the pkgIndex.tcl files that it finds in the
auto_path. THEN Tcl knows about lots of packages. So you could use [catch
{package require BOGUS-PKG-NAME}] to get the same effect, without actually
loading a package.

--
Bob Techentin techenti...@NOSPAMmayo.edu
Mayo Foundation (507) 538-5495
200 First St. SW FAX (507) 284-9171
Rochester MN, 55901 USA http://www.mayo.edu/sppdg/

0 new messages