Get an introduction to the Tcl programming language and the GUI capabilities of the Tk toolkit.
This 2-day class will introduce the student to the Tcl programming
language and to the GUI capabilities of the Tk toolkit.
Upon completion of this class, the student will be able to write useful Tcl programs
to automate operating system tasks and add scripting capabilities to C programs.
Students will also be introduced to Tcl's GUI capabilities through Tk toolkit.
The format of the class is mixed lecture/lab, with lab exercises immediately following
each major topic. The lab exercises are intended to reinforce the preceding lecture
topic(s), and are designed to be directly applicable in an EDA context.
Release date
Jume 29, 2016Level
1Training duration
2 daysPrice
USD 1600 or 16 Training CreditsCourse Part Number
HDT-INTROTCLTK-100Who Should Attend?
Engineers who want to customize and extend the productivity of EDA tools using the Tcl scripting language.Prerequisites
- A working knowledge of the UNIX operating system
- Basic programming experience most any language is recommended
Software Tools
- Any EDA tool that uses Tcl as a scripting language
Skills gained
After completing this comprehensive training, you will have the necessary skills to:- Describe the important differences between Tcl and keyword-based languages such as C or Perl
- Write well-crafted, reusable Tcl scripts to automate tasks
- Apply complex regular expressions to parse input and generate code
- Use the Tk library to add a graphical user interface around your script
- Extend Tcl by adding new commands backed by custom C code
Course Outline
- Introduction
- Tcl uses
- Comparison to other languages
- Getting Started
- Creating a Tcl program
- tclsh and wish interactive shells
- Loading a script
- Using a Tcl debugger
- Tcl Basics
- Command syntax
- Grouping and quoting
- Data types
- Variables
- Evaluating expressions
- Tcl Commands
- Control flow commands
- Loops
- Catching errors
- String processing
- The string command
- The format command
- String matching
- Regular Expressions
- Lists
- Creating lists
- Modifying lists
- Sorting and searching lists
- Tcl I/O
- Standard file I/O
- Opening files
- Opening sockets
- Binary I/O
- Tcl Arrays
- Creating arrays
- Working with arrays
- Data structures using arrays
- Procedures
- Creating procedures
- Scope
- The upvar and global commands
- Tcl in the Unix environment
- Executing programs
- Working with files
- Working with directories
- Environment variables
- Tk Basics
- Widgets
- Widget attributes
- Resources
- Arranging Widgets with Pack
- The 'cavity' model
- Stacking
- Anchoring
- Padding and filling
- Arranging widgets with Grid
- Basic grid
- Row and column spanning
- Row and column constraints
- Tk Events and Binding
- The bind command
- Focus
- Commands
- Key events
- Mouse events
- Basic Tk Widgets
- Labels
- Buttons
- Entry
- Frames
- Toplevel
- Menus
- Menubuttons
- Menu bars
- Pop-up menus
- Scrollbars
- Creating scrollbars
- Controlling scrollbars
- Listboxes
- Creating listboxes
- Listbox binding and control
- Text widget
- Text indices and marking
- Inserting text
- Tags
- Canvas widget
- Coordinates
- Canvas elements
- Combining Tcl and C
- Tcl Objects in C
- Tcl Commands in C
- Starting a Tcl interpreter
- Creating a stand-alone executable
Please download the respective PDF of your course: *
* The course version can be found in the training registration form