• Pass Tcl data (procs, lists, dicts) to remote system

    From Luis P. Mendes@21:1/5 to All on Sat Mar 11 21:13:25 2023
    Hi all!


    I know some Expect but what I'm asking is something different.
    Maybe something similar to what Ansible does.

    If I need to execute some command on a remote host, I could do something
    like `ssh user@remote /bin/sh /usr/bin/tclsh`.

    But what about if I want to pass some proc to a remote computer and get
    back the return of that proc as in a list or a dict?
    Is there a way to interact just within Tcl?


    Thank you in advance,


    Luís

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Rich@21:1/5 to Luis P. Mendes on Sat Mar 11 21:32:19 2023
    Luis P. Mendes <[email protected]> wrote:
    Hi all!


    I know some Expect but what I'm asking is something different.
    Maybe something similar to what Ansible does.

    If I need to execute some command on a remote host, I could do something
    like `ssh user@remote /bin/sh /usr/bin/tclsh`.

    But what about if I want to pass some proc to a remote computer and get
    back the return of that proc as in a list or a dict?
    Is there a way to interact just within Tcl?

    Take a look at the 'comm' package from Tcllib. It will let you call
    procs in other processes (and those other processes can be on other
    hosts, provided that a TCP connection can be made between them).

    With a little work (i.e., you'd have to write the handler) you can also
    pass a "proc" to another host and have it run there.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Luis P. Mendes@21:1/5 to Rich on Sun Mar 26 10:10:13 2023
    Sat, 11 Mar 2023 21:32:19 -0000 (UTC), Rich wrote:

    Luis P. Mendes <[email protected]> wrote:
    Hi all!


    I know some Expect but what I'm asking is something different.
    Maybe something similar to what Ansible does.

    If I need to execute some command on a remote host, I could do
    something like `ssh user@remote /bin/sh /usr/bin/tclsh`.

    But what about if I want to pass some proc to a remote computer and get
    back the return of that proc as in a list or a dict?
    Is there a way to interact just within Tcl?

    Take a look at the 'comm' package from Tcllib. It will let you call
    procs in other processes (and those other processes can be on other
    hosts, provided that a TCP connection can be made between them).

    With a little work (i.e., you'd have to write the handler) you can also
    pass a "proc" to another host and have it run there.



    Thank you Rich!

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