• Announce: tclmain 0.1 released

    From D Groth@21:1/5 to All on Sat Jan 28 09:43:19 2023
    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

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Luc@21:1/5 to D Groth on Sat Jan 28 17:13:17 2023
    I really like this idea. Thanks.

    --
    Luc

    **************************
    On Sat, 28 Jan 2023 09:43:19 -0800 (PST), D Groth wrote:

    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

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From D Groth@21:1/5 to Luc on Sun Jan 29 22:45:15 2023
    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

    Luc schrieb am Samstag, 28. Januar 2023 um 21:13:21 UTC+1:
    I really like this idea. Thanks.

    --
    Luc

    **************************
    On Sat, 28 Jan 2023 09:43:19 -0800 (PST), D Groth wrote:

    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

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From D Groth@21:1/5 to D Groth on Sat Sep 30 09:21:45 2023
    Dear all,

    The goal of tclmain is to provide Tcl applications as part of a package without the need to install the applications in separate folder like bin. The syntax is `tclmain -p pkgname args ...` to call a function `pkgname::main argv`.

    I updated to version 0.2.0 which provides support for `pkgname::main argv` procedure as entry points in addtion to pkgname_main.tcl etc files.

    See the README for details.

    https://github.com/mittelmark/tclmain

    Detlef

    D Groth schrieb am Montag, 30. Januar 2023 um 07:45:20 UTC+1:
    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
    Luc schrieb am Samstag, 28. Januar 2023 um 21:13:21 UTC+1:
    I really like this idea. Thanks.

    --
    Luc

    **************************
    On Sat, 28 Jan 2023 09:43:19 -0800 (PST), D Groth wrote:

    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

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From D Groth@21:1/5 to D Groth on Sun Oct 1 03:53:53 2023
    D Groth schrieb am Samstag, 30. September 2023 um 18:21:49 UTC+2:
    Dear all,

    The goal of tclmain is to provide Tcl applications as part of a package without the need to install the applications in separate folder like bin. The syntax is `tclmain -p pkgname args ...` to call a function `pkgname::main argv`.

    I updated to version 0.2.0 which provides support for `pkgname::main argv` procedure as entry points in addtion to pkgname_main.tcl etc files.

    See the README for details.

    https://github.com/mittelmark/tclmain

    Detlef
    D Groth schrieb am Montag, 30. Januar 2023 um 07:45:20 UTC+1:
    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
    Luc schrieb am Samstag, 28. Januar 2023 um 21:13:21 UTC+1:
    I really like this idea. Thanks.

    --
    Luc

    **************************
    On Sat, 28 Jan 2023 09:43:19 -0800 (PST), D Groth wrote:

    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

    Here I provide some background information about the tclmain approach, the motivation and two ways to implement it for package developers:

    https://htmlpreview.github.io/?https://raw.githubusercontent.com/mittelmark/tclmain/master/doc/tclmain.html

    I think Tcl is really missing this pythonic like approach of calling package derived applications without trouble.

    Detlef

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)