New to TCL/Expect

Posted by ghostshunter on 2015-01-14 09:23
Forums: Expect discussion | OS: All / Any

Hello,

can someone please point me toward an article to how me how to use TCL/Expect on Windows. I have downloaded Active TCL but I can't get my head around it and how to use the console. what confuses me the most is in order to use Expect you need to use it through teacup/teapot. can someone please help me to put all these peaces together ? I have experience with C/C++ and JAVA so I was expecting a compilator and an editor to wright the script ... am I wrong ?

thank you in advance

grahams
ActiveState Staff
Thu, 2015-01-15 16:36

Tcl is an interpreter. There is no compiler.

Tcl scripts are just text files. You can use any text editor to write a script, but you want a text editor, not a word processor, so it's very helpful if you use Notepad rather than Word. There are specialized programming editors for scripting languages, and they do things like highlighting invalid syntax and the like. See Komodo Edit for a good free editor, or Komodo IDE for something with a lot more power.

As an interpreter, you don't need a script file either. You can use Tkcon to code directly from a "console" in interactive mode, or do the same by starting tclsh or wish from the cmd.exe command line.

TEA(pot/cup) is a package manager. You never program through it; you only use it to manage or add additional content from an online library of modular code. Expect wasn't always a well behaved bit of modular code, so originally, it needed to be pre-installed. Since 8.4, Expect has been a proper module and since 8.5, it must be installed by using TEA services. You may still encounter references to an "expect" shell. Those are from the days before Expect was a module, and while the code in those examples may still be correct, you should be prepared for the worst.

Note that there is no 64-bit version of Expect for Windows systems, so part of your confusion may be due to looking for something that isn't there. Note also that some 64-bit Windows platforms have known problems running a 32-bit version of Tcl+Expect, as does a 32-bit version of Windows 8.1.

ghostshunter | Mon, 2015-01-26 13:57

Thank you for your replay, it just I found bit "not straight forward" process to start codding

thanks again

Ghost's