Re: is it possible to programmatically access Tcllib and Tklib versions?

Liste des GroupesRevenir à cl tcl 
Sujet : Re: is it possible to programmatically access Tcllib and Tklib versions?
De : mark (at) *nospam* qtrac.eu (Mark Summerfield)
Groupes : comp.lang.tcl
Date : 27. Jun 2024, 06:37:11
Autres entêtes
Message-ID : <utudneS1LKYaZ-H7nZ2dnZfqnPUAAAAA@brightview.co.uk>
References : 1 2
User-Agent : Pan/0.154 (Izium; 517acf4)
On Wed, 26 Jun 2024 16:31:58 -0000 (UTC), Rich wrote:

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 %

Ok, understood. Thanks.

Date Sujet#  Auteur
26 Jun 24 * is it possible to programmatically access Tcllib and Tklib versions?4Mark Summerfield
26 Jun 24 `* Re: is it possible to programmatically access Tcllib and Tklib versions?3Rich
27 Jun 24  `* Re: is it possible to programmatically access Tcllib and Tklib versions?2Mark Summerfield
27 Jun 24   `- Re: is it possible to programmatically access Tcllib and Tklib versions?1Harald Oehlmann

Haut de la page

Les messages affichés proviennent d'usenet.

NewsPortal