Rocksolid Light

News from da outaworlds

mail  files  register  groups  login

Message-ID:  

BOFH excuse #396: Mail server hit by UniSpammer.


comp / comp.lang.tcl / Re: tclexecomp won't print anything

SubjectAuthor
* tclexecomp won't print anythingLuc
+* Re: tclexecomp won't print anythingRich
|`- Re: tclexecomp won't print anythingLuc
`* Re: tclexecomp won't print anythingMichael Niehren
 `- Re: tclexecomp won't print anythingLuc

1
Subject: tclexecomp won't print anything
From: Luc
Newsgroups: comp.lang.tcl
Organization: A noiseless patient Spider
Date: Tue, 17 Dec 2024 04:43 UTC
Path: eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: luc@sep.invalid (Luc)
Newsgroups: comp.lang.tcl
Subject: tclexecomp won't print anything
Date: Tue, 17 Dec 2024 01:43:22 -0300
Organization: A noiseless patient Spider
Lines: 25
Message-ID: <20241217014322.26cf400d@lud1.home>
MIME-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
Injection-Date: Tue, 17 Dec 2024 05:43:23 +0100 (CET)
Injection-Info: dont-email.me; posting-host="f47be636d9297afaa4e0d79d9b92e427";
logging-data="1648502"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19cQdks+keoDyVFCJRjIjCR5k4CsN+Mqag="
Cancel-Lock: sha1:oanLh2mnzpgbVGODkatUuhxdjEo=
View all headers

I wrapped an entire Tk application with tclexecomp.

It works. Everything works.

Then I have some idea and decide to test something. The story gets
long, but we can shorten it.

Instead of a full-fledged application, only this script is packed:

$ cat p1.tcl
puts "hello"
exit

Yes, that's it.

So I pack it and run it and nothing prints. Why?

(In the slightly longer version of this story, I am trying to puts
the output of [pwd], [glob *], [parray env] and source another .tcl
file.)

--
Luc
>>

Subject: Re: tclexecomp won't print anything
From: Rich
Newsgroups: comp.lang.tcl
Organization: A noiseless patient Spider
Date: Tue, 17 Dec 2024 05:08 UTC
References: 1
Path: eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: rich@example.invalid (Rich)
Newsgroups: comp.lang.tcl
Subject: Re: tclexecomp won't print anything
Date: Tue, 17 Dec 2024 05:08:06 -0000 (UTC)
Organization: A noiseless patient Spider
Lines: 32
Message-ID: <vjr0vm$1i1a9$5@dont-email.me>
References: <20241217014322.26cf400d@lud1.home>
Injection-Date: Tue, 17 Dec 2024 06:08:07 +0100 (CET)
Injection-Info: dont-email.me; posting-host="876264b18c00e4986a1fe1d9ed3feb32";
logging-data="1639753"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1//vzbpP5Ux4L/PRP5Fc9fL"
User-Agent: tin/2.6.1-20211226 ("Convalmore") (Linux/5.15.139 (x86_64))
Cancel-Lock: sha1:smMgyX6QrXUChAbKdJOXOWW5+Co=
View all headers

Luc <luc@sep.invalid> wrote:
> I wrapped an entire Tk application with tclexecomp.
>
> It works. Everything works.
>
> Then I have some idea and decide to test something. The story gets
> long, but we can shorten it.
>
> Instead of a full-fledged application, only this script is packed:
>
> $ cat p1.tcl
> puts "hello"
> exit
>
> Yes, that's it.
>
> So I pack it and run it and nothing prints. Why?
>
> (In the slightly longer version of this story, I am trying to puts
> the output of [pwd], [glob *], [parray env] and source another .tcl
> file.)

You left out a bit of critical info: Linux or Windows as OS?

Under Linux, provided you are running that from within a terminal
session (not 'launching' it by clicking an icon as in the usual
windows way) you should see 'hello' output on the terminal.

In windows, it depends upon what executable you use to launch it, not
every windows executable gets a terminal (and if it does not get a
terminal it has no stdout, so "puts" just disappear).

Subject: Re: tclexecomp won't print anything
From: Michael Niehren
Newsgroups: comp.lang.tcl
Organization: www.abavia.com
Date: Tue, 17 Dec 2024 07:51 UTC
References: 1
From: michael@niehren.de (Michael Niehren)
Subject: Re: tclexecomp won't print anything
Newsgroups: comp.lang.tcl
Reply-To: michael@niehren.de
Date: Tue, 17 Dec 2024 08:51:42 +0100
References: <20241217014322.26cf400d@lud1.home>
User-Agent: KNode/0.10.9
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7Bit
Message-ID: <nnd$5d4f202c$2b3e2cdd@f4430092730ed8b3>
Organization: www.abavia.com
Path: eternal-september.org!news.eternal-september.org!feeder3.eternal-september.org!2.eu.feeder.erje.net!feeder.erje.net!feeder2.feed.ams11.usenet.farm!feed.usenet.farm!peer03.ams4!peer.am4.highwinds-media.com!news.highwinds-media.com!feed.abavia.com!abe006.abavia.com!abp002.abavia.com!reseller!not-for-mail
Lines: 33
Injection-Date: Tue, 17 Dec 2024 08:51:42 +0100
Injection-Info: reseller; mail-complaints-to="abuse@abavia.com"
X-Received-Bytes: 1559
View all headers

tclexecomp always starts tk (aka wish) if possible. If you start it on an
headless linux server, it only starts an tclsh.
So your "puts" will be on the TK-Console, which is on default not visible.
Put an "console show" in the first line of your script and you will see your
"puts" as an output in the console window.

best regards
Michael

> I wrapped an entire Tk application with tclexecomp.
>
> It works. Everything works.
>
> Then I have some idea and decide to test something. The story gets
> long, but we can shorten it.
>
> Instead of a full-fledged application, only this script is packed:
>
> $ cat p1.tcl
> puts "hello"
> exit
>
> Yes, that's it.
>
> So I pack it and run it and nothing prints. Why?
>
> (In the slightly longer version of this story, I am trying to puts
> the output of [pwd], [glob *], [parray env] and source another .tcl
> file.)
>

Subject: Re: tclexecomp won't print anything
From: Luc
Newsgroups: comp.lang.tcl
Organization: A noiseless patient Spider
Date: Tue, 17 Dec 2024 17:24 UTC
References: 1 2
Path: eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: luc@sep.invalid (Luc)
Newsgroups: comp.lang.tcl
Subject: Re: tclexecomp won't print anything
Date: Tue, 17 Dec 2024 14:24:09 -0300
Organization: A noiseless patient Spider
Lines: 43
Message-ID: <20241217142409.467ce2ec@lud1.home>
References: <20241217014322.26cf400d@lud1.home>
<vjr0vm$1i1a9$5@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
Injection-Date: Tue, 17 Dec 2024 18:24:10 +0100 (CET)
Injection-Info: dont-email.me; posting-host="6c94c4def76a6a71d427c014c5945b3e";
logging-data="1939397"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX185PiGx0xIjC+6xXpXybS3DAXQpdFzQGL8="
Cancel-Lock: sha1:RpzeCHP+1CFfY7ee1Okv+bB5stg=
View all headers

On Tue, 17 Dec 2024 05:08:06 -0000 (UTC), Rich wrote:

>Luc <luc@sep.invalid> wrote:
>> I wrapped an entire Tk application with tclexecomp.
>>
>> It works. Everything works.
>>
>> Then I have some idea and decide to test something. The story gets
>> long, but we can shorten it.
>>
>> Instead of a full-fledged application, only this script is packed:
>>
>> $ cat p1.tcl
>> puts "hello"
>> exit
>>
>> Yes, that's it.
>>
>> So I pack it and run it and nothing prints. Why?
>>
>> (In the slightly longer version of this story, I am trying to puts
>> the output of [pwd], [glob *], [parray env] and source another .tcl
>> file.)
>
>You left out a bit of critical info: Linux or Windows as OS?
>
>Under Linux, provided you are running that from within a terminal
>session (not 'launching' it by clicking an icon as in the usual
>windows way) you should see 'hello' output on the terminal.
>
>In windows, it depends upon what executable you use to launch it, not
>every windows executable gets a terminal (and if it does not get a
>terminal it has no stdout, so "puts" just disappear).
>
**************************

It's Linux. I run it as ./p1 in a terminal session.

--
Luc
>>

Subject: Re: tclexecomp won't print anything
From: Luc
Newsgroups: comp.lang.tcl
Organization: A noiseless patient Spider
Date: Tue, 17 Dec 2024 17:27 UTC
References: 1 2
Path: eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: luc@sep.invalid (Luc)
Newsgroups: comp.lang.tcl
Subject: Re: tclexecomp won't print anything
Date: Tue, 17 Dec 2024 14:27:33 -0300
Organization: A noiseless patient Spider
Lines: 37
Message-ID: <20241217142733.36388caa@lud1.home>
References: <20241217014322.26cf400d@lud1.home>
<nnd$5d4f202c$2b3e2cdd@f4430092730ed8b3>
MIME-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
Injection-Date: Tue, 17 Dec 2024 18:27:34 +0100 (CET)
Injection-Info: dont-email.me; posting-host="6c94c4def76a6a71d427c014c5945b3e";
logging-data="1939397"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18OOZDdZdADbBK9IId+JdWmUzU7Y3P1aQA="
Cancel-Lock: sha1:/mN4Xq6u1ldIWKIagIkbg/Zj5Lw=
View all headers

On Tue, 17 Dec 2024 08:51:42 +0100, Michael Niehren wrote:

>tclexecomp always starts tk (aka wish) if possible. If you start it on an
>headless linux server, it only starts an tclsh.
>So your "puts" will be on the TK-Console, which is on default not visible.
>Put an "console show" in the first line of your script and you will see
>your "puts" as an output in the console window.
>
>best regards
> Michael
**************************

I still don't understand.

If I run it as a script,

$ wish ./p1.tcl

there is output.

But if I run the executable on a terminal,

$ ./p1

then there is no output.

Like I said, I have packed a pretty much complete application with
tclexecomp and it can output if I want it to.

But an extremely simple script can't output.

I still don't understand why.

--
Luc
>>

1

rocksolid light 0.9.8
clearnet tor