Exploring Expect Book by Don Libes at Bookstore - Bookswagon
close menu
Bookswagon
search
My Account
Book 1
Book 2
Book 3
Book 1
Book 2
Book 3
Book 1
Book 2
Book 3
Book 1
Book 2
Book 3
Home > Computing and Information Technology Books > Operating systems > Exploring Expect: A Tcl-Based Toolkit for Automating Interactive Programs(Nutshell Handbook)
Exploring Expect: A Tcl-Based Toolkit for Automating Interactive Programs(Nutshell Handbook)

Exploring Expect: A Tcl-Based Toolkit for Automating Interactive Programs(Nutshell Handbook)


     0     
5
4
3
2
1



International Edition


X
About the Book

Expect is quickly becoming a part of every UNIX user's toolbox. It allows you to automate Telnet, FTP, passwd, rlogin, and hundreds of other applications that normally require human interaction. Using Expect to automate these applications will allow you to speed up tasks and, in many cases, solve new problems that you never would have even considered before.

For example, you can use Expect to test interactive programs with no changes to their interfaces. Or wrap interactive programs with Motif-like front-ends to control applications by buttons, scrollbars, and other graphic elements with no recompilation of the original programs. You don't even need the source code! Expect works with remote applications, too. Use it to tie together Internet applications including Telnet, Archie, FTP, Gopher, and Mosaic.

Don Libes is the creator of Expect as well as the author of this book. In Exploring Expect, he provides a comprehensive tutorial on all of Expect's features, allowing you to put it immediately to work on your problems. In a down-to-earth and humorous style, he provides numerous examples of challenging real-world applications and how they can be automated using Expect to save you time and money.

Expect is the first of a new breed of programs based on Tcl, the Tool Command Language that is rocking the computer science community. This book provides an introduction to Tcl and describes how Expect applies Tcl's power to the new field of interaction automation. Whether your interest is in Expect or interaction automation or you simply want to learn about Tcl and see how it has been used in real software, you will find Exploring Expect a treasure trove of easy-to-understand and valuable information.



Table of Contents:
Preface. Expect-Why another tool? Tcl-A Little History. Acknowledgments. How To Read This Book. Notational Conventions. Exercises. Chapter 1: Intro-What Is Expect? Ouch, Those Programs Are Painful! A Very Brief Overview A First Script-dialback Total Automation Differing Behavior When Running Non-Interactively Partial Automation Dangerous, Unfriendly, Or Otherwise Unlikable User Interfaces Graphical Applications A Little More About Tcl Job Control Background Processes Using Expect With Other Programs Using Expect On UNIX Using Expect On Other Operating Systems Using Expect In Real Applications Using Expect In Commercial Applications-Legalese Obtaining Expect and the Examples Expect And Tcl Resources Exercises. Chapter 2: Tcl-Introduction And Overview Everything Is A String Quoting Conventions Expressions Braces-Deferring Evaluation Control Structures More On Expressions Lists More Ways To Manipulate Strings Arrays Indirect References Handling Errors Evaluating Lists As Commands Passing By Reference Working With Files File I/O Executing UNIX Commands Environment Variables Handling Unknown Commands Libraries Is There More To Tcl? Exercises. Chapter 3: Getting Started With Expect The send Command The expect Command Anchoring What Happens When Input Does Not Match Pattern-Action Pairs Example-Timed Reads In The Shell The spawn Command The interact Command Example-Anonymous ftp Exercises. Chapter 4: Glob Patterns And Other Basics The * Wildcard More Glob Patterns Backslashes Handling Timeout Handling End Of File (eof) Hints On The spawn Command Back To Eof The close Command Programs That Ignore Eof The wait Command Exercises. Chapter 5: Regular Expressions Regular Expressions-A Quick Start Identifying Regular Expressions And Glob Patterns Using Parentheses To Override Precedence Using Parentheses For Feedback More On The timed-read Script Pattern Matching Strategy Nested Parentheses Always Count Parentheses Even Inside Of Alternatives Example-The Return Value From A Remote Shell Matching Customized Prompts Example-A Smart Remote Login Script What Else Gets Stored In expect_out More On Anchoring Exercises. Chapter 6: Patterns, Actions, And Limits Matching Anything But Really Complex Patterns Really Simple Patterns Matching One Line And Only One Line Tcl's string match Command Tcl's regexp Command Tcl's regsub Command Ignoring Case All Those Other String Functions Are Handy, Too Actions That Affect Control Flow Example-rogue Character Graphics More Actions That Affect Control Flow Matching Multiple Times Recognizing Prompts (Yet Again) Speed Is On Your Side Controlling The Limits Of Pattern Matching Input The full_buffer Keyword Double Buffering Perpetual Buffering The Politics Of Patterns Expecting A Null Character Parity Length Limits Comments In expect Commands Restrictions On expect Arguments eval-Good, Bad, And Ugly Exercises. Chapter 7: Debugging Patterns And Controlling Output Pattern Debugging Enabling Internal Diagnostics Logging Internal Diagnostics Disabling Normal Program Output The log_user Command Example-su2 Recording All Expect Output Sending Messages To The Log About File Names Log And Diagnostic State Exercises. Chapter 8: Handling A Process And A User The send_user Command The send_error Command The expect_user Command Dealing With Programs That Reprompt Dealing With Programs That Miss Input Sleeping Line Versus Character-Oriented And Other Terminal Modes Echoing Prompting For A Password On Behalf Of A Program Security And Insecurity Resetting The Terminal Upon Exit More On The stty Command The system Command Redirecting The Standard Input Or Output The expect_tty Command The send_tty Command Exercises. Chapter 9: The Expect Program Expect-Just Another Program Invoking Scripts Without saying "expect" Rewriting The #! Line The .exp Extension The -- And Other Flags The -c Flag The -f Flag Writing The #! Line The -i Flag The -n And -N Flags The -d Flag The -D Flag The -b Flag The - Flag The interpreter Command Exercises. Chapter 10: Handling Multiple Processes The spawn_id Variable Example-chess Versus chess Example-Automating The write Command How exp_continue Affects spawn_id The Value Of spawn_id Affects Many Commands Symbolic Spawn Ids Job Control Procedures Introduce New Scopes How Expect Writes Variables In Different Scopes Predefined Spawn Ids Exercises. Chapter 11: Handling Multiple Processes Simultaneously Implicit Versus Explicit Spawn Ids Waiting From Multiple Processes Simultaneously Example-Answerback Which Pattern Goes With Which Spawn Id Which Spawn Id Matched Spawn Id Lists Example-Connecting Together Two Users To An Application Example-Timing All Commands Matching Any Spawn Id Already Listed The expect_before And expect_after Commands Indirect Spawn Ids Exercises. Chapter 12: Send Implicit Versus Explicit Spawn Ids Sending To Multiple Processes Sending Without Echoing Sending To Programs In Cooked Mode Sending Slowly Sending Humanly Sending Nulls Sending Breaks Sending Strings That Look Like Flags Sending Character Graphics Comparing send To puts Exercises. Chapter 13: Spawn The Search Path Philosophy-Processes Are Smart Treating Files As Spawned Processes Opening Ttys Bugs And Workarounds Process Pipelines And Ptys Automating xterm Checking For Errors From spawn spawn -noecho Example-unbuffer Obtaining Console Output Setting Pty Modes From spawn Hung Ptys Restrictions On Spawning Multiple Processes Getting The Process Id From A Spawn Id Using File I/O Commands On Spawned Processes Exercises. Chapter 14: Signals Signals Signals In Spawned Processes Notes On Specific Signals When And Where Signals Are Evaluated Overriding The Original Return Value Using A Different Interpreter To Process Signals Exit Handling Exercises. Chapter 15: Interact The interact Command Simple Patterns Exact Matching Matching Patterns From The Spawned Process Regular Expressions What Happens To Things That Do Not Match More Detail On Matching Echoing Avoiding Echoing Giving Feedback Without -echo Telling The User About New Features Sending Characters While Pattern Matching The continue And break Actions The return Action The Default Action Detecting End-Of-File Matching A Null Character Timing Out More On Terminal Modes (Or The -reset Flag) Example-Preventing Bad Commands Exercises. Chapter 16: Interacting With Multiple Processes Connecting To A Process Other Than The Currently Spawned Process Connecting To A Process Instead Of The User Example-rz And sz Over rlogin Redirecting Input And Output Default Input And Output Controlling Multiple Processes-kibitz Combining Multiple Inputs Or Outputs Which Spawn Id Matched Indirect Spawn Ids An Extended Example-xkibitz Exercises. Chapter 17: Background Processing Putting Expect In The Background Running Expect Without A Controlling Terminal Disconnecting The Controlling Terminal The fork Command The disconnect Command Reconnecting Using kibitz From Other Expect Scripts Mailing From Expect A Manager For Disconnected Processes-dislocate Expect As A Daemon Example-Automating Gopher and Mosaic telnet Connections Exercises. Chapter 18: Debugging Scripts Tracing Logging Command Tracing Variable Tracing Example-Logging By Tracing UNIX System Call Tracing Tk And tkinspect Traditional Debugging Debugger Command Overview And Philosophy Stepping Over Procedure Calls Stepping Into Procedure Calls Where Am I The Current Scope Moving Up And Down The Stack Returning From A Procedure Continuing Execution Defining Breakpoints Help Changing Program Behavior Changing Debugger Behavior Exercises. Chapter 19: Expect + Tk = Expectk Tk-A Brief Technical Overview Expectk The send Command An Extended Example-tkpasswd Using Tk Widgets To Prompt For Passwords The expect Command And The Tk Event Loop The expect_background Command Multiple Spawn Ids In expect_background Background Actions Example-A Dumb Terminal Emulator Example-A Smarter Terminal Emulator Using The Terminal Emulator For Testing And Automation Exercises. Chapter 20: Extended Examples Encrypting A Directory File Transfer Over telnet You Have Unread News-tknewsbiff Exercises. Chapter 21: Expect, C, And C++ Overview Linking Include Files Ptys And Processes Allocating Your Own Pty Closing The Connection To The Spawned Process Expect Commands Regular Expression Patterns Exact Matching Matching A Null What Characters Matched When The Number Of Patterns Is Not Known In Advance Expecting From Streams Running In The Background Handling Multiple Inputs And More On Timeouts Output And Debugging Miscellany Pty Trapping Exercises. Chapter 22: Expect As Just Another Tcl Extension Adding Expect To Another Tcl-based Program Differences Between Expect And The Expect Extension In Another Program Adding Extensions To Expect Adding Extensions To Expectk Creating Script-less Expect Programs Functions And Variables In The Expect Extension Exercises. Chapter 23: Miscellaneous Random Numbers Example-Generating Random Passwords The Expect Library Expect Versions Timestamps The time Command Exercises. Appendix: Commands and Variables Commands And Flags Variables Index Of Scripts Index

About the Author :
Don Libes is married to Susan Mulroney, a professor in the Department of Physiology and Biophysics at the Georgetown University School of Medicine. Sue performs research in the area of kidney growth and development. Their well-hydrated daughter, Kenna, has two lovely kidneys.


Best Sellers


Product Details
  • ISBN-13: 9781565920903
  • Publisher: O'Reilly Media
  • Publisher Imprint: O'Reilly Media
  • Height: 230 mm
  • No of Pages: 602
  • Returnable: Y
  • Spine Width: 35 mm
  • Weight: 1001 gr
  • ISBN-10: 1565920902
  • Publisher Date: 10 Jan 1995
  • Binding: Paperback
  • Language: English
  • Returnable: Y
  • Series Title: Nutshell Handbook
  • Sub Title: A Tcl-Based Toolkit for Automating Interactive Programs
  • Width: 170 mm


Similar Products

Add Photo
Add Photo

Customer Reviews

REVIEWS      0     
Click Here To Be The First to Review this Product
Exploring Expect: A Tcl-Based Toolkit for Automating Interactive Programs(Nutshell Handbook)
O'Reilly Media -
Exploring Expect: A Tcl-Based Toolkit for Automating Interactive Programs(Nutshell Handbook)
Writing guidlines
We want to publish your review, so please:
  • keep your review on the product. Review's that defame author's character will be rejected.
  • Keep your review focused on the product.
  • Avoid writing about customer service. contact us instead if you have issue requiring immediate attention.
  • Refrain from mentioning competitors or the specific price you paid for the product.
  • Do not include any personally identifiable information, such as full names.

Exploring Expect: A Tcl-Based Toolkit for Automating Interactive Programs(Nutshell Handbook)

Required fields are marked with *

Review Title*
Review
    Add Photo Add up to 6 photos
    Would you recommend this product to a friend?
    Tag this Book Read more
    Does your review contain spoilers?
    What type of reader best describes you?
    I agree to the terms & conditions
    You may receive emails regarding this submission. Any emails will include the ability to opt-out of future communications.

    CUSTOMER RATINGS AND REVIEWS AND QUESTIONS AND ANSWERS TERMS OF USE

    These Terms of Use govern your conduct associated with the Customer Ratings and Reviews and/or Questions and Answers service offered by Bookswagon (the "CRR Service").


    By submitting any content to Bookswagon, you guarantee that:
    • You are the sole author and owner of the intellectual property rights in the content;
    • All "moral rights" that you may have in such content have been voluntarily waived by you;
    • All content that you post is accurate;
    • You are at least 13 years old;
    • Use of the content you supply does not violate these Terms of Use and will not cause injury to any person or entity.
    You further agree that you may not submit any content:
    • That is known by you to be false, inaccurate or misleading;
    • That infringes any third party's copyright, patent, trademark, trade secret or other proprietary rights or rights of publicity or privacy;
    • That violates any law, statute, ordinance or regulation (including, but not limited to, those governing, consumer protection, unfair competition, anti-discrimination or false advertising);
    • That is, or may reasonably be considered to be, defamatory, libelous, hateful, racially or religiously biased or offensive, unlawfully threatening or unlawfully harassing to any individual, partnership or corporation;
    • For which you were compensated or granted any consideration by any unapproved third party;
    • That includes any information that references other websites, addresses, email addresses, contact information or phone numbers;
    • That contains any computer viruses, worms or other potentially damaging computer programs or files.
    You agree to indemnify and hold Bookswagon (and its officers, directors, agents, subsidiaries, joint ventures, employees and third-party service providers, including but not limited to Bazaarvoice, Inc.), harmless from all claims, demands, and damages (actual and consequential) of every kind and nature, known and unknown including reasonable attorneys' fees, arising out of a breach of your representations and warranties set forth above, or your violation of any law or the rights of a third party.


    For any content that you submit, you grant Bookswagon a perpetual, irrevocable, royalty-free, transferable right and license to use, copy, modify, delete in its entirety, adapt, publish, translate, create derivative works from and/or sell, transfer, and/or distribute such content and/or incorporate such content into any form, medium or technology throughout the world without compensation to you. Additionally,  Bookswagon may transfer or share any personal information that you submit with its third-party service providers, including but not limited to Bazaarvoice, Inc. in accordance with  Privacy Policy


    All content that you submit may be used at Bookswagon's sole discretion. Bookswagon reserves the right to change, condense, withhold publication, remove or delete any content on Bookswagon's website that Bookswagon deems, in its sole discretion, to violate the content guidelines or any other provision of these Terms of Use.  Bookswagon does not guarantee that you will have any recourse through Bookswagon to edit or delete any content you have submitted. Ratings and written comments are generally posted within two to four business days. However, Bookswagon reserves the right to remove or to refuse to post any submission to the extent authorized by law. You acknowledge that you, not Bookswagon, are responsible for the contents of your submission. None of the content that you submit shall be subject to any obligation of confidence on the part of Bookswagon, its agents, subsidiaries, affiliates, partners or third party service providers (including but not limited to Bazaarvoice, Inc.)and their respective directors, officers and employees.

    Accept


    Inspired by your browsing history


    Your review has been submitted!

    You've already reviewed this product!
    Your IP: 216.73.216.21 IN