| |||||||||||
| |||||||||||
Short Perl/Tk example Posted by admin (Graham Ellis), 21 September 2002 I've just added the flollowing to s short section of notes on Perl/Tk; thought you might like to share it. I really like Tk, by the way - do have a look at it. The one limitation is on web appliactions - what a pity it doesn't run in the browser!Quoting the new notes: There are whole books on Tk; this text gives you just a flavour. Here's a final example for now which provides a GUI front end to a web access log file. Simply put in the name of a host computer in the text box, and your label will be altered to report on the number of times that host accessed the server during the time logged in the file access_log. Code:
-textvariable is worth some comment. Rather than read back a value from a user input box (that can be done too!), we have chosen to have the variable $nnn's current value "automatically reflected" in the entry box. Very easy coding, and any time the variable is changed it's visible presence on the display also changes. You'll see even in this simple example how Tk can be used to generate an easy interface to your system for users who aren't happy with a command line interface. This page is a thread posted to the opentalk forum
at www.opentalk.org.uk and
archived here for reference. To jump to the archive index please
follow this link.
|
| ||||||||||
PH: 01144 1225 708225 • FAX: 01144 1225 793803 • EMAIL: info@wellho.net • WEB: http://www.wellho.net • SKYPE: wellho |