Deutsch English Français Italiano |
<v5hfpu$279i8$2@dont-email.me> View for Bookmarking (what is this?) Look up another Usenet article |
Path: ...!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail From: Rich <rich@example.invalid> Newsgroups: comp.lang.tcl Subject: Re: is it possible to programmatically access Tcllib and Tklib versions? Date: Wed, 26 Jun 2024 16:31:58 -0000 (UTC) Organization: A noiseless patient Spider Lines: 22 Message-ID: <v5hfpu$279i8$2@dont-email.me> References: <eYecndZfv-BNWOb7nZ2dnZfqnPUAAAAA@brightview.co.uk> Injection-Date: Wed, 26 Jun 2024 18:31:58 +0200 (CEST) Injection-Info: dont-email.me; posting-host="f1f0464a150e143234d52dfb8b591d5a"; logging-data="2336328"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+7OkSLBogLe4Jeb/WRPkl1" User-Agent: tin/2.6.1-20211226 ("Convalmore") (Linux/5.15.139 (x86_64)) Cancel-Lock: sha1:Dybp2sh8e9jd229f25e/B+CI+vk= Bytes: 1617 Mark Summerfield <mark@qtrac.eu> wrote: > For a --help option or for an About box I like to show lib versions. > This is easy for Tcl and for Tk, e.g. > > "Tcl v$::tcl_patchLevel/Tk v$::tk_version" > > But I can't see how to get the versions of Tcllib and Tklib. Is this > possible? I don't think so, as each module within tcllib is separately versioned. You can show the versions by either capturing the return from package require, or by rerunning package require at the time you want the data: $ rlwrap tclsh % package require cmdline 1.5.2 % set cmdline_ver [package require cmdline] 1.5.2 % puts "cmdline version is $cmdline_ver" cmdline version is 1.5.2 %