Sysop: | Amessyroom |
---|---|
Location: | Fayetteville, NC |
Users: | 43 |
Nodes: | 6 (1 / 5) |
Uptime: | 38:59:50 |
Calls: | 282 |
Calls today: | 1 |
Files: | 884 |
Messages: | 75,727 |
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
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?
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
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.
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?