Rocksolid Light

Welcome to Rocksolid Light

mail  files  register  newsreader  groups  login

Message-ID:  

Prototype designs always work. -- Don Vonada


devel / comp.lang.tcl / open "|"

SubjectAuthor
* open "|"saitology9
+* open "|"greg
|`- open "|"saitology9
`* open "|"Andreas Leitgeb
 `- open "|"saitology9

1
open "|"

<u9rtl9$1j1ok$1@dont-email.me>

  copy mid

https://news.novabbs.org/devel/article-flat.php?id=11936&group=comp.lang.tcl#11936

  copy link   Newsgroups: comp.lang.tcl
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: saitology9@gmail.com (saitology9)
Newsgroups: comp.lang.tcl
Subject: open "|"
Date: Wed, 26 Jul 2023 15:54:16 -0400
Organization: A noiseless patient Spider
Lines: 8
Message-ID: <u9rtl9$1j1ok$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Wed, 26 Jul 2023 19:54:17 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="6bf5efbb732ef3f0bd11a7f006b54229";
logging-data="1672980"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/LGCtWNpw6s9vCnBwN1prK"
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101
Thunderbird/102.11.0
Cancel-Lock: sha1:pXr+jjt+5PI6MhULZVxiDkrL3T8=
Content-Language: en-US
 by: saitology9 - Wed, 26 Jul 2023 19:54 UTC

When I run the following command from a terminal, I see the output.
I wanted to put it in a proc. But the script gets no data.

It may just be a Windows thing but if it is not, how do I make this work?

% set f [open "|C:/Windows/System32/cmd.exe /Q /C ipconfig" r]
% fconfigure $f -blocking 0 -buffering full

Re: open "|"

<d77c6cbf-396c-4ce1-8c63-4eb3089148e9n@googlegroups.com>

  copy mid

https://news.novabbs.org/devel/article-flat.php?id=11937&group=comp.lang.tcl#11937

  copy link   Newsgroups: comp.lang.tcl
X-Received: by 2002:a05:620a:8894:b0:767:f116:1901 with SMTP id qk20-20020a05620a889400b00767f1161901mr7745qkn.11.1690402932706; Wed, 26 Jul 2023 13:22:12 -0700 (PDT)
X-Received: by 2002:a05:6870:c7a6:b0:1ba:56e9:24a9 with SMTP id dy38-20020a056870c7a600b001ba56e924a9mr768155oab.7.1690402932327; Wed, 26 Jul 2023 13:22:12 -0700 (PDT)
Path: i2pn2.org!i2pn.org!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!feeder.usenetexpress.com!tr3.iad1.usenetexpress.com!69.80.99.14.MISMATCH!border-1.nntp.ord.giganews.com!nntp.giganews.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.tcl
Date: Wed, 26 Jul 2023 13:22:12 -0700 (PDT)
In-Reply-To: <u9rtl9$1j1ok$1@dont-email.me>
Injection-Info: google-groups.googlegroups.com; posting-host=185.250.212.102; posting-account=99ziWAoAAADLScDbI_CyfIcpa_gFZ0zh
NNTP-Posting-Host: 185.250.212.102
References: <u9rtl9$1j1ok$1@dont-email.me>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <d77c6cbf-396c-4ce1-8c63-4eb3089148e9n@googlegroups.com>
Subject: Re: open "|"
From: gregor.ebbing@googlemail.com (greg)
Injection-Date: Wed, 26 Jul 2023 20:22:12 +0000
Content-Type: text/plain; charset="UTF-8"
Lines: 12
 by: greg - Wed, 26 Jul 2023 20:22 UTC

saitology9 schrieb am Mittwoch, 26. Juli 2023 um 21:54:22 UTC+2:
> When I run the following command from a terminal, I see the output.
> I wanted to put it in a proc. But the script gets no data.
>
> It may just be a Windows thing but if it is not, how do I make this work?
>
> % set f [open "|C:/Windows/System32/cmd.exe /Q /C ipconfig" r]
> % fconfigure $f -blocking 0 -buffering full

wiki:
https://wiki.tcl-lang.org/page/How+to+run+external+script+from+Tk+and+make+it+throw+output+to+the+console%3F

Re: open "|"

<u9s06i$1j9ek$1@dont-email.me>

  copy mid

https://news.novabbs.org/devel/article-flat.php?id=11938&group=comp.lang.tcl#11938

  copy link   Newsgroups: comp.lang.tcl
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: saitology9@gmail.com (saitology9)
Newsgroups: comp.lang.tcl
Subject: Re: open "|"
Date: Wed, 26 Jul 2023 16:37:38 -0400
Organization: A noiseless patient Spider
Lines: 10
Message-ID: <u9s06i$1j9ek$1@dont-email.me>
References: <u9rtl9$1j1ok$1@dont-email.me>
<d77c6cbf-396c-4ce1-8c63-4eb3089148e9n@googlegroups.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Wed, 26 Jul 2023 20:37:39 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="6bf5efbb732ef3f0bd11a7f006b54229";
logging-data="1680852"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+dB6mI94nlt02ebtKvkLmR"
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101
Thunderbird/102.11.0
Cancel-Lock: sha1:gkhgY4OHnOEw5uKxFVSwyUQl9to=
Content-Language: en-US
In-Reply-To: <d77c6cbf-396c-4ce1-8c63-4eb3089148e9n@googlegroups.com>
 by: saitology9 - Wed, 26 Jul 2023 20:37 UTC

On 7/26/2023 4:22 PM, greg wrote:
>
> wiki:
> https://wiki.tcl-lang.org/page/How+to+run+external+script+from+Tk+and+make+it+throw+output+to+the+console%3F
>
>

Thank you. I think I am doing all of the steps there. I did not
include it before but I also setup a readable handler right after.

Re: open "|"

<slrnuc35ts.bg2o.avl@logic.at>

  copy mid

https://news.novabbs.org/devel/article-flat.php?id=11939&group=comp.lang.tcl#11939

  copy link   Newsgroups: comp.lang.tcl
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: avl@logic.at (Andreas Leitgeb)
Newsgroups: comp.lang.tcl
Subject: Re: open "|"
Date: Wed, 26 Jul 2023 22:01:32 -0000 (UTC)
Organization: A noiseless patient Spider
Lines: 26
Message-ID: <slrnuc35ts.bg2o.avl@logic.at>
References: <u9rtl9$1j1ok$1@dont-email.me>
Reply-To: avl@logic.at
Injection-Date: Wed, 26 Jul 2023 22:01:32 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="2008fc0f73f91ab7fb5fb0df7964de5d";
logging-data="1703053"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX195fLv6adJpeOLV7fIq9aC6"
User-Agent: slrn/1.0.3 (Linux)
Cancel-Lock: sha1:1ccjCab8RsOXD53yGsjDRPiCdyg=
 by: Andreas Leitgeb - Wed, 26 Jul 2023 22:01 UTC

saitology9 <saitology9@gmail.com> wrote:
> When I run the following command from a terminal, I see the output.
> I wanted to put it in a proc. But the script gets no data.
>
> It may just be a Windows thing but if it is not, how do I make this work?
>
> % set f [open "|C:/Windows/System32/cmd.exe /Q /C ipconfig" r]
> % fconfigure $f -blocking 0 -buffering full

I gave it a try, and I noticed that after the open, a black window
appears and immediately disappears... I'm pretty sure that this
is the window of cmd.exe appearing and immediately taking ipconfig's
output with it to the digital nirvana/afterlife.
cmd.exe itself doesn't produce output, so that's why you don't get
to see any input from the pipe.

Try this instead:

% set f [open "|ipconfig" r]

or, if you don't want to rely on search path, then this one:

% set f [open "|C:/Windows/System32/ipconfig.exe" r]

This seems to do just what you seem to have expected.

Re: open "|"

<u9s6ig$1k2v7$1@dont-email.me>

  copy mid

https://news.novabbs.org/devel/article-flat.php?id=11940&group=comp.lang.tcl#11940

  copy link   Newsgroups: comp.lang.tcl
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: saitology9@gmail.com (saitology9)
Newsgroups: comp.lang.tcl
Subject: Re: open "|"
Date: Wed, 26 Jul 2023 18:26:23 -0400
Organization: A noiseless patient Spider
Lines: 11
Message-ID: <u9s6ig$1k2v7$1@dont-email.me>
References: <u9rtl9$1j1ok$1@dont-email.me> <slrnuc35ts.bg2o.avl@logic.at>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Wed, 26 Jul 2023 22:26:24 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="6d77288f3cc5a20a109b104dbfb2b2e4";
logging-data="1706983"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18T0MiaHIm56HDp7mDuKYnj"
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101
Thunderbird/102.11.0
Cancel-Lock: sha1:ZdXsdGUH4VNQx25e87o2WTwLHYc=
In-Reply-To: <slrnuc35ts.bg2o.avl@logic.at>
Content-Language: en-US
 by: saitology9 - Wed, 26 Jul 2023 22:26 UTC

On 7/26/2023 6:01 PM, Andreas Leitgeb wrote:
> cmd.exe itself doesn't produce output, so that's why you don't get
> to see any input from the pipe.
>

Thanks. Yes, I was doing some searching and this is the answer. It turns
out that cmd itself generates no output. FYI, the /Q and /C were to
turn off the windowing/interactive mode so it doesn't need user input
and stay around afterwards. Your suggestions work fine.


devel / comp.lang.tcl / open "|"

1
server_pubkey.txt

rocksolid light 0.9.81
clearnet tor