Provides you with ebooks download links of TCl, basic syntax, tcl script, tcl odds and ends, tcl/tk plugin, tcl object in c/c++, and tk books.

Tcl Basics

By IIT Delhi

Part I introduces the basics of Tcl. Everyone should read Chapter 1, which describes the fundamental properties of the language. Tcl is really quite simple, so beginners can pick it up quickly. The experienced programmer should review Chapter 1 to eliminate any misconceptions that come from using other languages. Chapter 2 is a short introduction to running Tcl and Tk on UNIX, Windows, and Macintosh systems. You may want to look at this chapter first so you can try out the examples as you read Chapter 1.

Chapter 3 presents a sample application, a CGI script, that implements a guestbook for a Web site. The example uses several facilities that are described in detail in later chapters. The goal is to provide a working example that illustrates the power of Tcl.

The rest of Part I covers basic programming with Tcl. Simple string processing is covered in Chapter 4. Tcl lists, which share the syntax rules of Tcl commands, are explained in Chapter 5. Control structure like loops and if statements are described in Chapter 6. Chapter 7 describes Tcl procedures, which are new commands that you write in Tcl. Chapter 8 discusses Tcl arrays. Arrays are the most flexible and useful data structure in Tcl. Chapter 9 describes file I/O and running other programs. These facilities let you build Tcl scripts that glue together other programs and process data in files. After reading Part I you will know enough Tcl to read and understand other Tcl programs, and to write simple programs yourself.

Tcl/Tk quick start

By Brian Bilbrey

This tutorial is designed for those with experience in one or more programming or scripting languages. While Tcl/Tk is available on several platforms, including Win32 and MacOS as well as several of the *NIX environments, this tutorial is written in the context of running on a GNU/Linux installation.

Starting out, I'll introduce Tcl/Tk and summarize a small part of the language's history. Then, I'll review key features of the Tcl/Tk scripting language and interpreter, discuss some of the extensions to the language, and examine several examples of Tcl/Tk in action. The text is accompanied by code fragments and occasionally an image of the resulting output (since Tk is a GUI toolkit, after all).

Finally, I'll wrap up with a presentation of some external resources, both Web and print, to help you deeper into the Tcl/Tk environment.

Origins of Tcl/Tk
Tcl stands for Tool Command Language. Tk is the Graphical Toolkit extension of Tcl, providing a variety of standard GUI interface items to facilitate rapid, high-level application development. Development on Tcl/Tk, pronounced "tickle tee-kay", began in 1988 by John K. Ousterhout (shown in the image), then a Professor at U.C. Berkeley (UCB). Tcl was designed with the specific goals of extensibility, a shallow learning curve, and ease of embedding. Tk development began in 1989, and the first version was available in 1991. Dr. Ousterhout continued development of Tcl/Tk after he left UCB, then going to work for Sun Microsystems for a stint. Now at Tcl Developer Xchange (which begat Ajuba Solutions, which was purchased by Interwoven), he keeps on improving the language, currently in version 8.3.2 stable and 8.4 development, as of this writing.

Read More/Download

Tcl Style Guide

By Ray Johnson

This is a manual for people who are developing Tcl code for Wish or any other Tcl application. It describes a set of conventions for writing code and the associated test scripts. There are three reasons for the conventions. First, the conventions ensure that certain important things get done; for example, every procedure must have documentation that describes each of its arguments and its result, and there must exist test scripts that exercise every line of code. Second, the conventions guarantee that all of the Tcl and Tk code has a uniform style. This makes it easier for us to use, read, and maintain each other’s code. Third, the conventions help to avoid some common mistakes by prohibiting error-prone constructs such as building lists by hand instead of using the list building procedures.

This document is based heavily on the Tcl/Tk Engineering Manual written by John Ousterhout. John’s engineering manual specified the style of the C code used in the implementation of Tcl/Tk and many of its extensions. The manual is very valuable to the development of Tcl/Tk and is an important reason why Tcl is a relatively easy system to maintain. Deciding any style standard involves making trade-offs that are usually subjective. This standard was created in an iterative process involving the Tcl/Tk group at Sun Laboratories. I don’t claim that these conventions are the best possible ones, but the exact conventions don’t really make that much difference. The most important thing is that we all do things the same way.

Please write your code so that it conforms to the conventions from the very start. For example, don’t write comment-free code on the assumption that you’ll go back and put the comments in later once the code is working. This simply won’t happen. Regardless of how good your intentions are, when it comes time to go back and put in the comments you’ll find that you have a dozen more important things to do; as the body of uncommented code builds up, it will be harder and harder to work up the energy to go back and fix it all. One of the fundamental rules of software is that its structure only gets worse over time; if you don’t build it right to begin with, it will never get that way later.

The rest of this document consists of 8 major parts. We start with Section 2 which discusses executable files. Section 3 discusses the overall structure of packages and namespaces. Section 4 describes the structure of a Tcl code file and how to write procedure headers. Section 5 desribes the Tcl naming conventions. Section 6 presents low-level coding conventions, such as how to indent and where to put curly braces. Section 7 contains a collection of rules and suggestions for writing comments. Section 8 describes how to write and maintain test suites. Section 9 contains a few miscellaneous topics, such as keeping a change log.

Read More/Download

Tcl/Tk Engineering Manual

By John K. Ousterhout

This is a manual for people who are developing C code for Tcl, Tk, and their extensions and applications. It describes a set of conventions for writing code and the associated test scripts. There are two reasons for the conventions. First, the conventions ensure that certain important things get done; for example, every procedure must have documentation that describes each of its arguments and its result, and there must exist test scripts that exercise every line of code. Second, the conventions guarantee that all of the Tcl and Tk code has a uniform style. This makes it easier for us to use, read, and maintain each other’s code.

Most of the conventions originated in the Sprite operating system project at U.C. Berkeley. At the beginning of the Sprite project my students and I decided that we wanted a uniform style for our code and documentation, so we held a series of meetings to choose the rules. The result of these meetings was a document called The Sprite Engineering Manual. None of us was completely happy with all the rules, but we all managed to live by them during the project and I think everyone was happy with the results. When I started work on Tcl and Tk, I decided to stick with the Sprite conventions. This document is based heavily on The Sprite Engineering Manual.

There are few things that I consider non-negotiable, but the contents of this manual are one of them. I don’t claim that these conventions are the best possible ones, but the exact conventions don’t really make that much difference. The most important thing is that we all do things the same way. Given that the core Tcl and Tk code follows the conventions, changing the rules now would cause more harm than good.

Please write your code so that it conforms to the conventions from the very start. Forexample, don’t write comment-free code on the assumption that you’ll go back and put the comments in later once the code is working. This simply won’t happen. Regardless of how good your intentions are, when it comes time to go back and put in the comments you’ll find that you have a dozen more important things to do; as the body of uncommented code builds up, it will be harder and harder to work up the energy to go back and fix it all. One of the fundamental rules of software is that its structure only gets worse over time; if you don’t build it right to begin with, it will never get that way later. When I write code I typically write the procedure headers for a whole file before I fill in any of the bodies.

The rest of this document consists of 8 major parts. Section 2 discusses the overall structure of a package and how to organize header files. Section 3 describes the structure of a C code file and how to write procedure headers. Section 4 desribes the Tcl/Tk naming conventions. Section 5 presents low-level coding conventions, such as how to indent and where to put curly braces. Section 6 contains a collection of rules and suggestions for writing comments. Section 7 describes how to write and maintain test suites. Section 8 describes how to make code portable without making it unreadable too. Section 9 contains a few miscellaneous topics, such as keeping a change log.

Palm Tcl: Programming Guide and Reference

By Ashok P. Nadkarni

Palm Tcl is a high level programming language and development environment for creating applications for handheld devices running the Palm OS operating system. It allows programmers to write applications without requiring them to know the intricacies of the Palm OS runtime environment. Programs written in Palm Tcl are generally an order of magnitude shorter than their C equivalents and can be written in a fraction of the time.

Palm OS is the operating system running on the most popular series of personal digital assistant (PDA) handheld computers – the Palm Organizer series from 3Com and Palm Computing, the Visor from Handspring and Clie from Sony. Because it has been custom designed for a PDA environment, Palm OS has some features as well as hardware resource limitations that impose an additional burden on programmers who wish to write applications for this platform. Palm Tcl’s goal is to simplify and accelerate the process of application development for Palm OS. In its current version (0.3), Palm Tcl supports most form based user interface elements in Palm OS V3.0, as well as support for databases and several system related functions. Applications written in Palm Tcl require at least V3.0 of Palm OS to run.

Read More/Download

Mastering Perl/Tk

By Steve Lidie and Nancy Walsh


Perl is arguably the most popular scripting language in use today. It is used for a wide variety of tasks, including file processing, system administration, web programming, and database connectivity. Early Perl users had to be content with command-line interfaces or full-screen interfaces using Curses or similar systems, but the splitting-off of the Tk widget library from the Tcl language opened a whole new world to Perl. Perl programmers could now easily create graphical interfaces for their programs using Tk's flexible and friendly widget set and, with little effort, those programs could be made to work across Windows and Unix platforms.

The relatively recent advent of the web browser would seem to have made the Tk interface obsolete. CGI programs are almost inherently cross-platform and provide many of the same widgets as Tk (this includes Menus, Buttons, text entry fields, and so on). However, the inherent statelessness of the Web makes it difficult to write some programs for it. Perl/Tk provides a richer widget set than that available to the CGI programmer. Server push and client pull try to get around some of these limitations, while JavaScript fills in other gaps, but the fact is, the user experience still falls short in many instances. It is for precisely this reason that Perl/Tk continues to flourish.

The Tk module gives the Perl programmer full access to the powerful Tk widget set. This rich and diverse library, like Perl itself, makes the easy things easy and the hard things possible. Easy things include designing graphical interfaces with Buttons, Checkbuttons, Menus, and text entry fields—all of which you will learn about in the first half of this book. The second half of the book contains more advanced topics, such as creating custom widgets, interprocess communication, images, animation, and key bindings. The goal of this book is to take you from Tk neophyte to Tk expert.

An Introduction to Tkinter

By Fredrik Lundh

The Tkinter module ("Tk interface") is the standard Python interface to the Tk GUI toolkit from Scriptics (formerly developed by Sun Labs).

Both Tk and Tkinter are available on most Unix platforms, as well as on Windows and Macintosh systems. Starting with the 8.0 release, Tk offers native look and feel on all platforms.

Tkinter consists of a number of modules. The Tk interface is located in a binary module named _tkinter (this was tkinter in earlier versions). This module contains the low-level interface to Tk, and should never be used directly by application programmers. It is usually a shared library (or DLL), but might in some cases be statically linked with the Python interpreter.

In addition to the Tk interface module, Tkinter includes a number of Python modules. The two most important modules are the Tkinter module itself, and a module called Tkconstants. The former automatically imports the latter, so to use Tkinter, all you need to do is to import one module:
import Tkinter
Or, more often:
from Tkinter import *

Tcl/Tk Cookbook

By Lakshmi Sastry and Venkat VSS Sastry

Tcl, Tool Command Language, is an interpreted language with programming features, available across platforms running Unix, Windows and the Apple Macintosh operating system. Tk, the associated toolkit is an easy and efficient way of developing window based applications. Application tasks are split into modules and any new application specific task is written and compiled as C or C++ program and exported as a new Tcl command. Then a Tcl script, a series of existing and new Tcl commands, is composed to make the overall application. The scripting language, much like any shell language, has the ability to access and execute any other programs. Therefore several Tcl based applications could be made to work together to create or extend into a new application.

Tcl consists of few syntax rules and a (still growing) set of core commands. Tk provides a higher level application programming interface for developing interactive widgets based applications, particularly for those who wish to concentrate on the functionality of their application and have no need to gain indepth programming expertise in the underlying window system and/or verbose toolkits such as OSF/Motif. Tcl/Tk is free, available now on Apple Macintosh and Windows and has a wide user base with a rich and growing mass of useful contributed software. The wider availabilty, usage and ease of teaching and learning of Tcl/Tk makes it the most appropriate tool for teaching the principles of Graphical User Interface design and development.

Why This Cookbook?
The purpose of this cookbook is to provide a suite of simple examples with annotated comments so a novice user could quickly climb the learning curve by means of pattern matching. It is largely aimed at readers who are new to developing toolkit based applications and at those who only need to know how to develop simple interfaces and have relatively short time to achieve that. The emphasis is on enabling the readers gain familiarity with Tcl/Tk programming within a very short-time so they can proceed to develope their own. This cookbook, by this very nature, is not exhaustive.

The Linux Tcl and Tk HOWTO

By Luca Rossetti

This document describes the Linux approach to Tcl, a scripting langua ge. It is an easy to learn interpreted language that uses a typeless approach to achieve a higher level of programming and a rapid application development. The Tk toolkit is a programming environment for creating graphical user interf aces (GUI) under X Window System. Their capabilities include the possibility to extend and embed in other application, rapid development and ease of use. Toge ther, Tcl and Tk provide many benefits both to application developer and user. Tk-ba sed interfaces tend to be much more customizable and dynamic than those built with one of the C or C++ based toolkits. Tk implements the Motif look and feel. A great number of interesting X applications are implemented entirely in Tk, with no new application-specific commands at all.

Currently the purpose of the document is limited to giving initial references to Linux users; in future versions I will try to incorporate a small "Programm ing Tutorial". Let me state that again: this is not (and doesn't want to substitute) an omnicomprehensive "user manual" or "reference" for Tcl and Tk development and programming - it's just a starting point for Linux users.

The author's concept of reference manual coincides with the definition of man pages and many people learn Tcl/Tk from these basic source of informati on. These files are a part of the source code distribution and are installed on your Linux box. You will be able to access the Tcl/Tk manual pages through the man command.

Many structured and complete programming tutorials have been written in order to let the new user begin hacking with Tcl/Tk; tons of other material are available in the Internet. Interpreting Tcl/Tk philosophy I won't try to reinvent the wheel, I will manage to glue the huge amount of material already available.

Tcl/Tk for Programmers

By J Adrian Zimmer


Tcl is a scripting language something like Perl but extensible and somewhat cleaner. Many extensions are available. Tk is an extension developed by the creator of Tcl and used for creating scripts that interact with users through windows. Tcl can act as a Unix shell and Tk was originally developed to create windows for the X Windows environment. Tcl was meant to be portable and Tcl/Tk has been ported to versions of Microsoft Windows and to the MacIntosh.
Some advantages of Tcl:
  • Tcl/Tk runs in essentially the same form on Windows, MacIntosh, and X Windows (Unix) platforms. With version 8.0, the same script will produce menus that are native to the platform on which the script runs.
  • Tcl/Tk runs as a plugin from web browsers made by Netscape and Microsoft. It provides a very flexible mechanism for creating a unique security policy to fit unique intranet and extranet needs.
  • Tcl/Tk is flexible and interpreted. You can tweak it to do what you want. You can write tools to help you with repetitive programming tasks.
  • Tcl/Tk is extensible. You can add language features that support the kinds of programming you must do.
  • You can use Tcl/Tk for fast high-level scripting that reuses code written in C/C++.
  • Although Tcl/Tk has a strong C/C++ connection, you can use Tcl/Tk without knowing any C/C++.
  • Tcl is a scripting language for running other programs.
  • Tk's GUI environment has been adopted into other languages, notably Perl and Python. Using it from Tcl keeps you up-to-date with its changes.
  • Tcl is the basis for Expect which is a useful language for controlling interactive applications.
This book is aimed at programmers who want to learn Tcl/Tk because they find these advantages attractive. It is a self-teaching book with more than 200 solved exercises. All exercises run on both Windows and Unix versions of Tcl/Tk. Only a couple require code variations to accomplish this. The material in this book comes close to being platform independent.
Programmers and systems administrators with other interests may wish to learn from this book as well:
  • Tcl/Tk is valuable to Unix systems administrators who want to provide their users with scripts accessible through a GUI front end. (The examples in this book do not illustrate systems administration topics because these tend to vary with the platform.)
  • Tcl/Tk is valuable to C/C++ programmers who want to learn a high-level scripting language for their user interfaces or for integrating pieces of a large system.
Although this book is meant to be studied sequentially by someone who works on the exercises, it can serve the purpose of an "introductory manual" as well. The index is designed to send you to the main place for any given topic. At that place you find cross references to other places.

The material is detailed but not inclusive. I have been concerned that descriptions not be so long or so detailed that few people would wish to study them and that descriptions not be so short that many people would need to go to another source before accomplishing anything useful.

This book is not a simple-minded introduction, not a comprehensive manual, and not a collection of production-quality scripts. It bridges the gaps between those things.

Read More/Download

Practical Programming in Tcl and Tk

By Brent Welch, Ken Jones, and Jeff Hobbs

Tcl stands for Tool Command Language. Tcl is really two things: a scripting language, and an interpreter for that language that is designed to be easy to embed into your application. Tcl and its associated graphical user-interface toolkit, Tk, were designed and crafted by Professor John Ousterhout of the University of California, Berkeley. You can find these packages on the Internet (as explained on page lii) and use them freely in your application, even if it is commercial. The Tcl interpreter has been ported from UNIX to DOS, Windows, OS/2, NT, and Macintosh environments. The Tk toolkit has been ported from the X window system to Windows and Macintosh.

I first heard about Tcl in 1988 while I was Ousterhout’s Ph.D. student at Berkeley. We were designing a network operating system, Sprite. While the students hacked on a new kernel, John wrote a new editor and terminal emulator. He used Tcl as the command language for both tools so that users could define menus and otherwise customize those programs. This was in the days of X10, and he had plans for an X toolkit based on Tcl that would help programs cooperate with each other by communicating with Tcl commands. To me, this cooperation among tools was the essence of Tcl.

This early vision imagined that applications would be large bodies of compiled code and a small amount of Tcl used for configuration and high-level commands. John’s editor, mx, and the terminal emulator, tx, followed this model. While this model remains valid, it has also turned out to be possible to write entire applications in Tcl. This is because the Tcl/Tk shell, wish, provides access to other programs, the file system, network sockets, plus the ability to create a graphical user interface. For better or worse, it is now common to find applications that contain thousands of lines of Tcl script.

This book was written because, while I found it enjoyable and productive to use Tcl and Tk, there were times when I was frustrated. In addition, working at Xerox PARC, with many experts in languages and systems, I was compelled to understand both the strengths and weaknesses of Tcl and Tk. Although many of my colleagues adopted Tcl and Tk for their projects, they were also just as quick to point out its flaws. In response, I have built up a set of programming techniques that exploit the power of Tcl and Tk while avoiding troublesome areas. This book is meant as a practical guide to help you get the most out of Tcl and Tk and avoid some of the frustrations I experienced.

It has been about 10 years since I was introduced to Tcl, and about five years since the first edition of this book. During the last several years I have been working under John Ousterhout, first at Sun Microsystems and now at Scriptics Corporation. I have managed to remain mostly a Tcl programmer while others in our group have delved into the C implementation of Tcl itself. I’ve been building applications like HTML editors, e-mail user interfaces, Web servers, and the customer database we run our business on. This experience is reflected in this book. The bulk of the book is about Tcl scripting, and the aspects of C programming to create Tcl extensions is given a lighter treatment. I have been lucky to remain involved in the core Tcl development, and I hope I can pass along the insights I have gained by working with Tcl.

Read More/Download

Followers

Privacy Policy
We use third-party advertising companies to serve ads when you visit our website. They uses cookies to serve ads on our site. These companies may use information (not including your name, address, email address, or telephone number) about your visits to this and other websites in order to provide advertisements about goods and services of interest to you. If you would like more information about this practice and to know your choices about not having this information used by these companies, click here
Disclaimer
Copyright of books and articles goes to its respective owners. In this blog, i am writing reviews about articles & books and giving free links available in world wide web. Intention of this blog is educative purpose and using contents from other sites as it is fair use. So if you have any complaints regarding books copyright, please contact book hosting servers for the removal of the book. we got all download links from the search engines and so we are not responsible for any damage due to the links given here. This is only for education purpose.