🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.lang.tcl
Article #53

Re: Python

#53
From: Rich
Date: Thu, 15 Oct 2026 02:45
38 lines
2573 bytes
saito <saitology9@gmail.com> wrote:
> On 10/14/2026 10:30 AM, Arjen wrote:
>> 
>> If it does not work, can you show us via a simple/minimal example
>> how you are trying to do it?
> 
> I am getting back to it. I read thru the docs on [chan pipe]. It seems a 
> powerful and flexible construct. Unfortunately no detailed explanation 
> or examples exist beyond redirecting or controlling the output part.
> 
> 
> This has syntax errors:
> 
> =======================================
> lassign [chan pipe] toPy fromPy
> 
> chan configure $toPy -buffering line
> chan configure $fromPy -buffering line
> 
> set fileID [open "|python.exe <$toPy 2>@ $fromPy" r]
> =======================================
> 
> % couldn't read file "file52551d0": no such file or directory
> 
> where that handle is the value of "toPy"

From the 'exec' man page, '<' is defined as working with "files" (i.e., 
filenames).

chan pipe gives you file id's, not names.

You want the <@ version:

<@ fileId      FileId  must be the identifier for an open file, such as
                      the return value from a previous call to  open.   It  is
                      used  as the standard input for the first command in the
                      pipeline.  FileId must have been opened for reading.
Technical Details
Message-ID: <11apent$21i3e$1@dont-email.me>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!eternal-september.org!feeder.eternal-september.org!nntp.eternal-september.org!.POSTED!not-for-mail
References: <11anurd$1gcvi$2@dont-email.me> <1791983631-153@newsgrouper.org> <11anvu2$1gqhm$2@dont-email.me> <1791986169-153@newsgrouper.org> <11ao22v$1hl78$1@dont-email.me> <1791988234-153@newsgrouper.org> <11aom3c$1psc4$2@dont-email.me>

Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!eternal-september.org!feeder.eternal-september.org!nntp.eternal-september.org!.POSTED!not-for-mail
From: Rich <rich@example.invalid>
Newsgroups: comp.lang.tcl
Subject: Re: Python
Date: Thu, 15 Oct 2026 02:45:17 -0000 (UTC)
Organization: A noiseless patient Spider
Lines: 38
Message-ID: <11apent$21i3e$1@dont-email.me>
References: <11anurd$1gcvi$2@dont-email.me> <1791983631-153@newsgrouper.org> <11anvu2$1gqhm$2@dont-email.me> <1791986169-153@newsgrouper.org> <11ao22v$1hl78$1@dont-email.me> <1791988234-153@newsgrouper.org> <11aom3c$1psc4$2@dont-email.me>
Injection-Date: Thu, 15 Oct 2026 02:45:19 +0000 (UTC)
Injection-Info: dont-email.me;
	logging-data="2148462"; mail-complaints-to="abuse@eternal-september.org";	posting-account="U2FsdGVkX1/1yHyI+yXgKJAa8K85MSP1"; posting-host="d683d1175a92cacc9989daff12fed624"
User-Agent: tin/2.6.1-20211226 ("Convalmore") (Linux/5.15.193 (x86_64))
Cancel-Lock: sha1:vf5QdEG3ZpUQ3NEH7/datKYgvPg= sha256:+WhcuHu6cJNoZxZE4uJBxfam9RYhrg1WuTLi3Vo6CyU=
	sha1:auPt828XXjkc4ZCrR0knzyxFbnc= sha256:ucWzyQmcySVItCIXJgFL9XIDFDMzdyyGedC4tFQcs3E=