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

installed packages in Tcl

2,851 views
Skip to first unread message

shady.ab...@gmail.com

unread,
Apr 26, 2008, 5:32:18 PM4/26/08
to
Hi All,

I would like to know which extensions do i have installed for the tcl
interpreter I have. what command to type or what correct path to look
in.

thanks in advance.

Aric Bills

unread,
Apr 26, 2008, 5:45:08 PM4/26/08
to

Type "package names".

shady.ab...@gmail.com

unread,
Apr 26, 2008, 6:00:34 PM4/26/08
to

thank you Aric,
it worked fine. But how about the paths of those extensions? I can't
find them in the lib directory.

Aric Bills

unread,
Apr 26, 2008, 7:11:36 PM4/26/08
to
On Apr 26, 2:00 pm, shady.abdelwa...@gmail.com wrote:
> thank you Aric,
> it worked fine. But how about the paths of those extensions? I can't
> find them in the lib directory.

The $auto_path variable contains the list of directories whose
subdirectories Tcl searches for packages.

Aric

shady.ab...@gmail.com

unread,
Apr 26, 2008, 9:26:42 PM4/26/08
to
I tried: echo $auto_path, but i received the following message:
auto_path: Undefined variable.

any help?

Aric Bills

unread,
Apr 26, 2008, 9:32:15 PM4/26/08
to

$auto_path is a tcl variable, not an environment variable. Fire up
tclsh and type in "puts $auto_path" to see its value.

vit...@gmail.com

unread,
Apr 26, 2008, 9:36:50 PM4/26/08
to

You have to do it from the TCL shell:
puts $auto_path

---Victor

keithv

unread,
Apr 27, 2008, 1:57:32 AM4/27/08
to

More deeply, you can do:
package ifneeded packageName [package require packageName]

This will tell you exactly how and from where to install
a given package. Usually this is straight-forward but some
packages install in bizarre ways.

Keith

shady.ab...@gmail.com

unread,
Apr 27, 2008, 6:10:17 AM4/27/08
to

I tried "package ifneeded packageName [package require packageName]",
but i received an error from the package require because it can't find
the packageName.

To be more precise, I tried including the "struct" package and the
"math::interpolate" package, but I don't know from where to download
them!!

Uwe Klein

unread,
Apr 27, 2008, 6:14:32 AM4/27/08
to
There are pitfalls:
me@home > tclsh
% package names
Tcl
% package require foobar
can't find package foobar
% package names
uuencode smtpd counter logger img::pixmap doctools::toc struct::tree math::rationalfunctions
math::statistics rc4 math::fourier tie::std::dsource tcltest opt img::pcx img::ico struct::set
soundex msgcat doctools uuid math::optimize time snacksphere util4gin Iwidgets ldap uri::urn
math::calculus tie ftp struct::pool autoproxy Tclx report comm tie::std::array img::sgi
math::polynomials snackogg textutil::expander grammar::fa::dexec tar img::gif img::sun htmlparse
nntp img::window grammar::fa math::complexnumbers math textutil ident cmdline csv browser
math::interpolate Img img::tga math::fuzzy img::png Tktable ripemd160 mime Itk Rrd ncgi ftp::geturl
Expect math::geometry profiler img::base html fileutil irc tie::std::log Tk Tnm http inifile control
ip BLT struct::graph multiplexer resolv cksum struct::skiplist des pop3d::udb struct::queue pop3d
crc16 img::jpeg img::bmp snack websh asn doctools::changelog switched stooop exif struct::list
grammar::fa::op tie::std::file sum snit img::ppm Tixsam doctools::cvs struct::stack pop3d::dbox
struct::record uri setup sound pop3 img::tiff grammar::fa::dacceptor tls bee struct png md4 dns
crc32 tie::std::rarray md5 img::xpm gin BWidget yencode math::special doctools::idx
struct::prioqueue md5crypt math::bignum img::xbm wm_default spf udp log math::constants Tcl
ripemd128 smtp img::ps Itcl treeql base64 sha1 Tix struct::matrix jpeg ftpd Tkined plugin

shady.ab...@gmail.com

unread,
Apr 27, 2008, 6:53:19 AM4/27/08
to
On Apr 27, 7:14 pm, Uwe Klein <uwe_klein_habertw...@t-online.de>
wrote:

yes... i realized this also, but i don't know why it happens???

shady.ab...@gmail.com

unread,
Apr 27, 2008, 6:56:47 AM4/27/08
to
the wiki and sourceforge do not have all the packages... any
suggestions from where to get them? and also how to know that i have
the dependencies for the downloaded packages??

thanks

Uwe Klein

unread,
Apr 27, 2008, 7:33:50 AM4/27/08
to
tcllib provides a wide range of (sub) packages
and you will only realy need the extra functionality
you have decided on to use.

aggregated package information:
http://www.tcl.tk/software/
http://www.flightlab.com/~joe/gutter/browse.html

upwards:
you have to require the package version that has
the features you need ( if they have been added in
a later version )
downwards:
during load packages are supposed to check if the
tcl/tk version and other required packages present
are "good enough".

uwe

shady.ab...@gmail.com

unread,
Apr 27, 2008, 8:30:20 AM4/27/08
to
On Apr 27, 8:33 pm, Uwe Klein <uwe_klein_habertw...@t-online.de>
wrote:

Hi uwe,

Could you clarify more, please? I couldn't get a full image of what
you meant.

Thanks in advance.

Uwe Klein

unread,
Apr 27, 2008, 9:09:58 AM4/27/08
to
shady.ab...@gmail.com wrote:

> Could you clarify more, please? I couldn't get a full image of what
> you meant.
>
> Thanks in advance.

Could you point out the white places?

uwe

shady.ab...@gmail.com

unread,
Apr 27, 2008, 9:50:02 AM4/27/08
to
On Apr 27, 10:09 pm, Uwe Klein <uwe_klein_habertw...@t-online.de>
wrote:

what do you mean by "white" places?

Uwe Klein

unread,
Apr 27, 2008, 10:31:10 AM4/27/08
to

The white places in your minds image.
What in my answer did you not understand?

uwe

Larry W. Virden

unread,
Apr 28, 2008, 7:45:22 AM4/28/08
to
On Apr 26, 5:32 pm, shady.abdelwa...@gmail.com wrote:
> I would like to know which extensions do i have installed for the tcl
> interpreter I have. what command to type or what correct path to look
> in.

Type the following:

$ tclsh
% package require NotThere
can't find package NotThere
% lsort [package names]
% lsort [package names]
BWidget Diagrams Dotsh Expect Img Itcl Itk Iwidgets Memchan Oratcl
Oratcl::utils Plotchart SASL SASL::NTLM SASL::XGoogleToken Tablelist
Tablelist_tile Tcl Tclsha1 Tclx Thread Tk Tkhtml Tktable Trf Ttrace
aes asn autoproxy autoscroll base32 base32::core base32::hex base64
bee bench bench::in bench::out::csv bench::out::text bibtex blowfish
chatwidget cksum cmdline comm control counter crc16 crc32 csv ctext
cursor datefield des

and so forth.

What you see will be dependant on what you have installed.

You might take a look into TkMan . I've used it on Unix systems in the
past to browse installed documentation. Unfortunately, there may be
cases where you don't have the man pages for the extensions you have
on your system.

Three cases where this can come up - 1) tclkit type interpreters, 2)
ActiveTcl with extra packages installed via teacup, 3) extensions
which only provide their docs in some form other than man pages.


In these cases, if you have access to the internet, web search engines
as well as http://wiki.tcl.tk/ can frequently help. If you do not have
access to the internet, then help figuring out how to use the package
may be a bit challenging.

Larry W. Virden

unread,
Apr 28, 2008, 7:49:20 AM4/28/08
to


Right now, the best help for you along these lines is ActiveTcl and
its "teacup" command. It interacts with a central database containing
many (on some platforms, over 400) extensions. Interacting with teacup
gives you the potential to install extensions already built.

If you read up on teacup, you will find there is also the ability to
have teacup "describe" an extension, and often the information about
dependencies and web home are stored in the metadata for the
extension.

If you can't find the information on the wiki, or via teacup, then ask
for specifics here and often people will be able to help.

0 new messages