Rocksolid Light

News from da outaworlds

mail  files  register  groups  login

Message-ID:  

BOFH excuse #421: Domain controller not responding


comp / comp.lang.tcl / Re: console not working

SubjectAuthor
* console not workingLuc
+* Re: console not workingRich
|`- Re: console not workingLuc
+* Re: console not workinggreg
|`* Re: console not workingLuc
| `- Re: console not workingMichael Niehren
`- Re: console not workingMichael Niehren

1
Subject: console not working
From: Luc
Newsgroups: comp.lang.tcl
Organization: A noiseless patient Spider
Date: Tue, 17 Dec 2024 21:51 UTC
Path: eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: luc@sep.invalid (Luc)
Newsgroups: comp.lang.tcl
Subject: console not working
Date: Tue, 17 Dec 2024 18:51:10 -0300
Organization: A noiseless patient Spider
Lines: 26
Message-ID: <20241217185110.3019fd7c@lud1.home>
MIME-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
Injection-Date: Tue, 17 Dec 2024 22:51:11 +0100 (CET)
Injection-Info: dont-email.me; posting-host="6c94c4def76a6a71d427c014c5945b3e";
logging-data="2029716"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18g1ks3r/NwSkdJCb1hAg/l8ZObXRxcS5c="
Cancel-Lock: sha1:E34km/a2+4QJqMNEf8bDeypsyz8=
View all headers

I am trying to run the 'console show' command. But Tk is not having it.

Error in startup script: invalid command name "console"
while executing
"console show"
(file "p1.tcl" line 4)
Compilation failed.

To my dismay, the manual says,

"Except for TkAqua, this command is not available when Tk is loaded
into a tclsh interpreter with 'package require Tk' as a conventional
terminal is expected to be present in that case."

I guess I will never understand that decision. So what if a terminal
is expected to be present? How about letting that decision up to us?

Anyway, I try to run the script with wish and the same error happens

Any solution to that?

--
Luc
>>

Subject: Re: console not working
From: Rich
Newsgroups: comp.lang.tcl
Organization: A noiseless patient Spider
Date: Wed, 18 Dec 2024 00:06 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: console not working
Date: Wed, 18 Dec 2024 00:06:44 -0000 (UTC)
Organization: A noiseless patient Spider
Lines: 33
Message-ID: <vjt3mk$1vehm$1@dont-email.me>
References: <20241217185110.3019fd7c@lud1.home>
Injection-Date: Wed, 18 Dec 2024 01:06:47 +0100 (CET)
Injection-Info: dont-email.me; posting-host="0a4897d36eecd2c0c7c91823a39c9faf";
logging-data="2079286"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19JOcEGoZabGC30F3EVBxxF"
User-Agent: tin/2.6.1-20211226 ("Convalmore") (Linux/5.15.139 (x86_64))
Cancel-Lock: sha1:iM+uPpdf/viJjj0kqMNEz6cMUy8=
View all headers

Luc <luc@sep.invalid> wrote:
> I am trying to run the 'console show' command. But Tk is not having it.
>
> Error in startup script: invalid command name "console"
> while executing
> "console show"
> (file "p1.tcl" line 4)
> Compilation failed.
>
>
> To my dismay, the manual says,
>
> "Except for TkAqua, this command is not available when Tk is loaded
> into a tclsh interpreter with 'package require Tk' as a conventional
> terminal is expected to be present in that case."
>
> I guess I will never understand that decision. So what if a terminal
> is expected to be present? How about letting that decision up to us?
>
> Anyway, I try to run the script with wish and the same error happens
>
> Any solution to that?

It is also only available on Windows (and maybe Mac) builds.

Linux (Unix) builds don't include it because a 'console' is already
available as the terminal emulator you launch the script from.

So if you are launchin p1.tcl on Linux, you'll get that error if you
try to do 'console show'.

The typical replacement under Linux is tkcon
https://wiki.tcl-lang.org/page/Tkcon

Subject: Re: console not working
From: Luc
Newsgroups: comp.lang.tcl
Organization: A noiseless patient Spider
Date: Wed, 18 Dec 2024 00:15 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: console not working
Date: Tue, 17 Dec 2024 21:15:08 -0300
Organization: A noiseless patient Spider
Lines: 25
Message-ID: <20241217211508.1a19fc4a@lud1.home>
References: <20241217185110.3019fd7c@lud1.home>
<vjt3mk$1vehm$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
Injection-Date: Wed, 18 Dec 2024 01:15:09 +0100 (CET)
Injection-Info: dont-email.me; posting-host="02a8cfc3d673de1952aae2ea99a6c2d5";
logging-data="2082055"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+9NVgDeZrOoWE6j3UWS63dPdMAgB2WS9I="
Cancel-Lock: sha1:FP8iChfxVgXEAPv2cw41E/wkSxE=
View all headers

On Wed, 18 Dec 2024 00:06:44 -0000 (UTC), Rich wrote:

>It is also only available on Windows (and maybe Mac) builds.
>
>Linux (Unix) builds don't include it because a 'console' is already
>available as the terminal emulator you launch the script from.
>
>So if you are launchin p1.tcl on Linux, you'll get that error if you
>try to do 'console show'.
>
>The typical replacement under Linux is tkcon
>https://wiki.tcl-lang.org/page/Tkcon
**************************

You don't say.

Then I can't follow the guidance that Michael Niehren gave me
yesterday regarding capturing the output of a tclexecomp packed
executable.

--
Luc
>>

Subject: Re: console not working
From: greg
Newsgroups: comp.lang.tcl
Organization: A noiseless patient Spider
Date: Wed, 18 Dec 2024 00:24 UTC
References: 1
Path: eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: gregor.ebbing@gmx.de (greg)
Newsgroups: comp.lang.tcl
Subject: Re: console not working
Date: Wed, 18 Dec 2024 01:24:58 +0100
Organization: A noiseless patient Spider
Lines: 35
Message-ID: <vjt4oq$1vk3v$1@dont-email.me>
References: <20241217185110.3019fd7c@lud1.home>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Wed, 18 Dec 2024 01:24:59 +0100 (CET)
Injection-Info: dont-email.me; posting-host="35872bb5c8f70de4fd6d2d8189fca78b";
logging-data="2084991"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+PGtfi5QLp45su/wdvkbGEsVA78OuBWiQ="
User-Agent: Mozilla Thunderbird
Cancel-Lock: sha1:fyGC7cK83yEDEKRyJhz2xNab7Nw=
Content-Language: de-DE
In-Reply-To: <20241217185110.3019fd7c@lud1.home>
View all headers

Am 17.12.24 um 22:51 schrieb Luc:
> I am trying to run the 'console show' command. But Tk is not having it.
>
> Error in startup script: invalid command name "console"
> while executing
> "console show"
> (file "p1.tcl" line 4)
> Compilation failed.
>
>
> To my dismay, the manual says,
>
> "Except for TkAqua, this command is not available when Tk is loaded
> into a tclsh interpreter with 'package require Tk' as a conventional
> terminal is expected to be present in that case."
>
> I guess I will never understand that decision. So what if a terminal
> is expected to be present? How about letting that decision up to us?
>
> Anyway, I try to run the script with wish and the same error happens
>
> Any solution to that?
>
Hello,
regarding console,
there are also differences between wish and tclsh on Windows:
http://www.tcl.tk/man/tcl/UserCmd/wish.htm#M14

One solution would be:
https://wiki.tcl-lang.org/page/console+for+Unix
a wrapper for console.tcl in $tk_library

Also works with Windows.

Gregor

Subject: Re: console not working
From: Luc
Newsgroups: comp.lang.tcl
Organization: A noiseless patient Spider
Date: Wed, 18 Dec 2024 01:05 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: console not working
Date: Tue, 17 Dec 2024 22:05:58 -0300
Organization: A noiseless patient Spider
Lines: 30
Message-ID: <20241217220558.5006a090@lud1.home>
References: <20241217185110.3019fd7c@lud1.home>
<vjt4oq$1vk3v$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
Injection-Date: Wed, 18 Dec 2024 02:05:59 +0100 (CET)
Injection-Info: dont-email.me; posting-host="02a8cfc3d673de1952aae2ea99a6c2d5";
logging-data="2095370"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/5BvBBbjf1c/nc3Azjq17t9+yNxa54QXQ="
Cancel-Lock: sha1:c5HsstrcB1bR6XBVXynMuwd9Cdk=
View all headers

On Wed, 18 Dec 2024 01:24:58 +0100, greg wrote:

>Hello,
>regarding console,
>there are also differences between wish and tclsh on Windows:
>http://www.tcl.tk/man/tcl/UserCmd/wish.htm#M14
>
>One solution would be:
>https://wiki.tcl-lang.org/page/console+for+Unix
>a wrapper for console.tcl in $tk_library
>
>Also works with Windows.
>
>Gregor
**************************

Thanks.

I ended up just making a text widget and using it as a debugger
pad.

Then I realized it's not possible to do what I wanted to do.
I was hoping I could look inside the internal tclexecomp
file system. I want to source a packed file. I'm not sure that
can be done. Freewrap does that. I think tclexecomp doesn't.

--
Luc
>>

Subject: Re: console not working
From: Michael Niehren
Newsgroups: comp.lang.tcl
Organization: www.abavia.com
Date: Wed, 18 Dec 2024 08:31 UTC
References: 1
From: michael@niehren.de (Michael Niehren)
Subject: Re: console not working
Newsgroups: comp.lang.tcl
Reply-To: michael@niehren.de
Date: Wed, 18 Dec 2024 09:31:20 +0100
References: <20241217185110.3019fd7c@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$2b8b7910$07943942@b8f340e4e1b967f4>
Organization: www.abavia.com
Path: eternal-september.org!news.eternal-september.org!feeder3.eternal-september.org!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!feed.abavia.com!abe006.abavia.com!abp002.abavia.com!reseller!not-for-mail
Lines: 34
Injection-Date: Wed, 18 Dec 2024 09:31:20 +0100
Injection-Info: reseller; mail-complaints-to="abuse@abavia.com"
View all headers

the "console" command is also availiable in the linux version of tclexecomp

call your script with without wrapping
tclexecomp64 p1.tcl

so the "console show" command will work and an extra console window will
be opened. There you can see the Output of stdout and stderr.

> I am trying to run the 'console show' command. But Tk is not having it.
>
> Error in startup script: invalid command name "console"
> while executing
> "console show"
> (file "p1.tcl" line 4)
> Compilation failed.
>
>
> To my dismay, the manual says,
>
> "Except for TkAqua, this command is not available when Tk is loaded
> into a tclsh interpreter with 'package require Tk' as a conventional
> terminal is expected to be present in that case."
>
> I guess I will never understand that decision. So what if a terminal
> is expected to be present? How about letting that decision up to us?
>
> Anyway, I try to run the script with wish and the same error happens
>
> Any solution to that?
>

Subject: Re: console not working
From: Michael Niehren
Newsgroups: comp.lang.tcl
Organization: www.abavia.com
Date: Wed, 18 Dec 2024 08:36 UTC
References: 1 2 3
From: michael@niehren.de (Michael Niehren)
Subject: Re: console not working
Newsgroups: comp.lang.tcl
Reply-To: michael@niehren.de
Date: Wed, 18 Dec 2024 09:36:18 +0100
References: <20241217185110.3019fd7c@lud1.home> <vjt4oq$1vk3v$1@dont-email.me> <20241217220558.5006a090@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$6005fb6a$7f88bb3a@b8f340e4e1b967f4>
Organization: www.abavia.com
Path: eternal-september.org!news.eternal-september.org!feeder3.eternal-september.org!news.szaf.org!3.eu.feeder.erje.net!feeder.erje.net!feeder2.feed.ams11.usenet.farm!feed.usenet.farm!feed.abavia.com!abe005.abavia.com!abp003.abavia.com!reseller!not-for-mail
Lines: 40
Injection-Date: Wed, 18 Dec 2024 09:36:18 +0100
Injection-Info: reseller; mail-complaints-to="abuse@abavia.com"
View all headers

Hi Luc,

you have access to the internal tclexecomp filesystem over the
/cvfs
mountpoint. It is mounted read-only on runtime. To take a look you can use
the "normal" filesystem commands like glob, file copy, ...

Greetings,
Michael

> On Wed, 18 Dec 2024 01:24:58 +0100, greg wrote:
>
>>Hello,
>>regarding console,
>>there are also differences between wish and tclsh on Windows:
>>http://www.tcl.tk/man/tcl/UserCmd/wish.htm#M14
>>
>>One solution would be:
>>https://wiki.tcl-lang.org/page/console+for+Unix
>>a wrapper for console.tcl in $tk_library
>>
>>Also works with Windows.
>>
>>Gregor
> **************************
>
> Thanks.
>
> I ended up just making a text widget and using it as a debugger
> pad.
>
> Then I realized it's not possible to do what I wanted to do.
> I was hoping I could look inside the internal tclexecomp
> file system. I want to source a packed file. I'm not sure that
> can be done. Freewrap does that. I think tclexecomp doesn't.
>

1

rocksolid light 0.9.8
clearnet tor