|
|
 |
 |
 |
 |
TCL(Tool Command Language) Scripting
|
 |
 |
 |
 |
 |
 |
 |
 |
tcl8.4 tclsh scripts running as 'interactive'
I'm trying to update a Windows 2000 box from Tcl8.3 to Tcl8.4. I've removed the old ActiveTcl installation, and installed ActiveTcl8.4.9.1. I now have problems running my tclsh scripts; running the script doesn't execute any of the TCL statements, instead one is put in interactive mode. We run the scripts from an MSYS box, so a test script looks like this: #!/usr/bin/tclsh puts "hello world" exit Running the script from the commandline simply puts me in interactive mode, as if I'd started the tclsh directly from the commandline. Doing puts $tcl_interactive on the commandline in interactive mode returns 0. That, however, doesn't seem to indicate much because on an older Tcl8.3 box, where my scripts work, $tcl_interactive is 0 regardless of whether I run it from a script or interactively. Does anyone have any idea of what's going on?
On 22 mei, 10:37, susara <judi@inet.co.za> wrote:
> I'm trying to update a Windows 2000 box from Tcl8.3 to Tcl8.4. I've > removed the old ActiveTcl installation, and installed > ActiveTcl8.4.9.1. > I now have problems running my tclsh scripts; running the script > doesn't execute any of the TCL statements, instead one is put in > interactive mode. > We run the scripts from an MSYS box, so a test script looks like this: > #!/usr/bin/tclsh > puts "hello world" > exit > Running the script from the commandline simply puts me in interactive > mode, as if I'd started the tclsh directly from the commandline. > Doing > puts $tcl_interactive > on the commandline in interactive mode returns 0. That, however, > doesn't seem to indicate much because on an older Tcl8.3 box, where my > scripts work, $tcl_interactive is 0 regardless of whether I run it > from a script or interactively. > Does anyone have any idea of what's going on?
I have no idea if it is related, but with Msys on my Windows XP machine at home, I do not have a prompt and the main window only appears after I press Enter. If it is related, the Msys environment is doing something strange. Regards, Arjen
Arjen Markus wrote: > If it is related, the Msys environment is doing something strange.
It sounds like it might be related, but then what I don't understand is that I haven't touched the MSYS environment; only uninstalled the old ActiveTcl and installed the new one. Also, a little bash script: #!/usr/bin/sh echo "hello world" exit works fine when called from the msys commandline. So if this is a problem with msys, it's got to do with tclsh specifically, I'd think.
On 22 Mai, 10:37, susara <judi@inet.co.za> wrote: > We run the scripts from an MSYS box, so a test script looks like this: > #!/usr/bin/tclsh > puts "hello world" > exit
Is your /usr/bin/tclsh really the ActiveTcl tclsh - and not maybe a wrapper shell script? What does puts [info nameofexecutable],[info patchlevel] report?
suchenwi wrote: > Is your /usr/bin/tclsh really the ActiveTcl tclsh - and not maybe a > wrapper shell script? What does > puts [info nameofexecutable],[info patchlevel] > report?
It says C:/msys/1.0/bin/tclsh.exe,8.4.9 If you're confused as to why I'm having /usr/bin/tclsh in my script but the info reports C:/msys/1.0/bin, it's because I cheated and put a symlink from /usr/bin to the real C:/ installation so I can use the same scripts on Linux and Windows.
|
 |
 |
 |
 |
|