Exercises, examples and other material relating to training module T241. This topic is presented on public course Tcl/Tk
Tcl is a language that's designed to be used within other software, and sometimes that other software is a Web server or even a browser. We'll show you how this works in this module, and we'll also introduce you to TclHttpd, which is a complete Web server application written in Tcl.
Related technical and longer articlesNasty Characters in Web Applications
|Articles and tips on this subject||updated|
|4461||Reading from a URL, and reading Json, from your Tcl script|
You can read from a URL in Tcl using the http package ... for example
package require http
set handle [::http::geturl http://www.wellho.co.uk/robots.txt]
And you can then collect the data:
set body [::http::data $handle]
and the http status code:
|2429||Tcl scripts / processes on a web server via CGI|
If you have programs / scripts / processes written in Tcl, you can run them on your web server via the Common gateway Interface, possibly with a bit of topping and tailing to read data from a form rather than via gets commands, and to ensure that the output does get the right headers attached to it and ...
|2238||Handling nasty characters - Perl, PHP, Python, Tcl, Lua|
Are your writing or maintaining a web based application that uses forms? If so, you have better be aware of some of the nasty characters that are around!
The < character, when echoed back from a users's input 'unchallenged', may form the start of a tag. So that in a relatively benign case, a user ...
|2040||Error: Cant read xxxxx: no such variable (in Tcl Tk)|
If you set a Tcl (Tcl/Tk) variable within a proc, or within the callback command of a widget, that variable does not exist at run time until you have run the proc or callback procedure, or until you have initialised the variable in some other way.
Let's see a Tk example. I have created a window with ...
|1785||What is running on your network? (tcl and expect)|
Earlier this week, I gave a much-tailored Tcl course, with a strong helping of expect.
Expect adds three major extra commands to Tcl - spawn to start a new process under the control of the running Tcl/Tk code, send to send information to it and expect to await for - and decide on how to process - a ...
Examples from our training material
Some modules are available for download
as a sample of our material or under an Open Training Notes License
for free download from [here]
Topics covered in this module
Some concerns on Tclets.
Server side Tcl via CGI.
The initial form.
The CGI program - inputs.
The CGI program - the application.
The CGI program - the response page.
Other matters on CGI and Tcl.
Web and non-web.
The TclHttpd web server.
What can TclHttpd handle?.
When would I use these?.
If you are looking for a complete course and not just a information on a single subject, visit our Listing and schedule
Well House Consultants specialise in training courses in
. We run
throughout the UK (and beyond for longer courses), and
at our training centre in Melksham, Wiltshire, England.
It's surprisingly cost effective to come on our public courses -
even if you live in a different
country or continent to us
We have a technical library of over 700 books on the subjects on which we teach.
These books are available for reference at our training centre.