Announce: tclmain 0.1 released

57 views
Skip to first unread message

D Groth

unread,
Jan 28, 2023, 12:43:22 PMJan 28
to
tclmain is a single Tcl file which supports running of Tcl applications directly from the package directory without the need to install them in a folder belonging to the users PATH variable.

Homepage: https://github.com/mittelmark/tclmain
Wikipage for discussion: https://wiki.tcl-lang.org/page/tclmain

The program tclmain provides the same feature as Python with its syntax `python -m modulename` does. tclmain looks in the package folder for files ending with `_main.tcl` or `_doc.tcl` etc. You can execute this files then with the following syntax:

tclmain -m pkgname main

Instead of -m as well -p is supported.

If the package does not provide these files the user can place such files as well in its config folder ~/.config/tclmain` on a Unix system.

The advantage in comparison is that there is a unified interface for running tcl application for the user. The developer does not need anymore an installation of the applications in the users PATH, just installing the package is enough.

For more information and examples look at the homepage and at the Wiki page.

Best regards,
Detlef

Luc

unread,
Jan 28, 2023, 3:13:21 PMJan 28
to
I really like this idea. Thanks.

--
Luc
>>
**************************

D Groth

unread,
Jan 30, 2023, 1:45:20 AMJan 30
to
Thanks.

Indeed, the more I code in Python the more I miss this approach in Tcl, but now it's there. The tclsh should support this out-of-the-box `tclsh -m packagename`.
May be the files should be named as well pkgMain.tcl pkgHelp.tcl pkgDemo.tcl and so on instead of the underline files. This would as well follow more the Tcl conventions. But that should be easy to implement.

BTW: I just started tclinstall in the same project which allows you to install Tcl packages using setup.tcl files like this:

`tclmain -m tclinstall setup.tcl`

Support for just copy the package folder completly will be added as well.

https://github.com/mittelmark/tclmain/tree/main/lib/tclinstall - WIP

Detlef
Reply all
Reply to author
Forward
0 new messages