TCL/TK script runs under Precise but not Quirky

For discussions about programming, programming questions/advice, and projects that don't really have anything to do with Puppy.
Post Reply
Message
Author
AustinGreen
Posts: 7
Joined: Sat 31 Oct 2015, 02:35

TCL/TK script runs under Precise but not Quirky

#1 Post by AustinGreen »

I have a TCL/TK script that starts off like this:

Code: Select all

#!/bin/sh
# the next line restarts using tclsh \
exec wish "$0" "$0 $@"
and then continues with TCL/TK code.

The file's permissions are 644.

In a console window,
if I pass the script name as an argument to 'wish', it runs fine;
if I pass the script name as an argument to 'bash', it runs fine;
if I source the script name, it exits the console process.

All good so far.

In ROX-filer its MIME type is shown as application/x-shellscript.

Under Precise Puppy, if I click on it in ROX-filer, it will execute the TCL/TK code as expected, displays windows, etc.
However, under Quirky April, it fails to execute. The icon in the ROX-filer window flashes about four times, but nothing else happens.

Grateful for any clues ...

AustinGreen
Posts: 7
Joined: Sat 31 Oct 2015, 02:35

Still not in the right forum ...

#2 Post by AustinGreen »

I don't know why this post has been moved here, this forum is for 'programming, ... and projects that don't really have anything to do with Puppy.' My question is not programming related, it is concerns the difference between two versions of Puppy - one of which will run a script without any error (so presumably the programming of the script is OK!) and one of which will not run it. It is perhaps a bug in Quirky Puppy; I was seeking help on where to look for the problem, since everything else appears identical between Precise and Quirky.

musher0
Posts: 14629
Joined: Mon 05 Jan 2009, 00:54
Location: Gatineau (Qc), Canada

#3 Post by musher0 »

Hi, Austin.

The moderator of this forum is Flash, and if he moves a thread, you don't
argue. :lol: (Aside from that, Flash is one of the most friendly and helpful
persons on this forum!)

The following may have a bearing on your subject. Remembering past
discussions on this subject, I know that Tcl/Tk is not a favorite language
of Barry K., he thinks it's "passé", IIRC. So he probably doesn't pay any
attention to putting in his Quirkies the appropriate libraries to support it.
You may have to go the extra distance on your own to install said libraries.

A while ago, there used to be an important tcl/tk specialist and dev
roaming around this forum, a "Pa McClermock" or something like that.
Maybe look him up -- and his contributions -- in the members' list above.
Or do a search on Tcl/Tk with our search utility, again, above, or on a
major search engine with
tck/tk murga-linux.com/puppy
I'm sure you'll find something.

For ex. this ask.com search. (The column at the right looks
"right on the button".)

I hope this helps.

musher0
musher0
~~~~~~~~~~
"You want it darker? We kill the flame." (L. Cohen)

AustinGreen
Posts: 7
Joined: Sat 31 Oct 2015, 02:35

#4 Post by AustinGreen »

Hi Musher,

Thanks for responding.

My point (perhaps not made well enough) was that the script runs fine under Quirky, as long as I run it from the shell command line; but if I run it by clicking on it in ROX-filer, it fails, whereas in Precise it works. So, the issue is that ROX-filer is not doing the right thing to run a TCL/TK script in Quirky, whereas in Precise, it is. Hence my contention that this is a Quirky issue not a TCL/TK coding issue.

I'm inclined to agree about TCL/TK, I would use Python and GTK myself, but having been given this script I just want to be able to run it. Translating it to Python feels like too much work at the present.

I'll take a look at the resources you suggest, anyway.

Regards,
Austin.

muggins
Posts: 6724
Joined: Fri 20 Jan 2006, 10:44
Location: hobart

#5 Post by muggins »

Sometimes, when a tcl script hasn't worked for me, it has when i changed:

Code: Select all

#!/bin/sh
# the next line restarts using tclsh \
exec wish "$0" "$0 $@" 
to:

Code: Select all

#!/usr/bin/wish
# the next line restarts using tclsh \
# exec wish "$0" "$0 $@" 

User avatar
mister_electronico
Posts: 969
Joined: Sun 20 Jan 2008, 20:20
Location: Asturias_ España
Contact:

I did this pets

#6 Post by mister_electronico »

I built these pets with wish8.5 you could be interesting.

http://www.murga-linux.com/puppy/viewto ... 672#839672


Cheers

Post Reply