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?
Mark Summerfield <[email protected]> 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 %
On Wed, 26 Jun 2024 16:31:58 -0000 (UTC), Rich wrote:
Mark Summerfield <[email protected]> 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.
| Sysop: | Keyop |
|---|---|
| Location: | Huddersfield, West Yorkshire, UK |
| Users: | 715 |
| Nodes: | 16 (2 / 14) |
| Uptime: | 47:00:43 |
| Calls: | 12,112 |
| Calls today: | 3 |
| Files: | 15,010 |
| Messages: | 6,518,497 |