Training, Open Source computer languages
PerlPHPPythonMySQLApache / TomcatTclRubyJavaC and C++LinuxCSS 
Search for:
Home Accessibility Courses Diary The Mouth Forum Resources Site Map About Us Contact
For 2021 - online Python 3 training - see ((here)).

Our plans were to retire in summer 2020 and see the world, but Coronavirus has lead us into a lot of lockdown programming in Python 3 and PHP 7.
We can now offer tailored online training - small groups, real tutors - works really well for groups of 4 to 14 delegates. Anywhere in the world; course language English.

Please ask about private 'maintenance' training for Python 2, Tcl, Perl, PHP, Lua, etc.
freezing output

Posted by erickio (erickio), 27 December 2004
I have a tcl/expect script that sends a "show ip route" command to a router. The output that is displayed from this command is around 800 to 100 lines. I don't understand what the source of the problem would be, but about half the time while the screen is displaying the output, my script freezes, and doesn't start again. I don't know if this is an issue with the size of the buffer being too small, or what else it could be. if you need any code examples i can show. tia

Posted by admin (Graham Ellis), 27 December 2004
Potentially a timing problem or something - use log_user to trace the output and see where it hangs.

Yes - a code sameple would help - otherwise we're guessing   - see the "posting FAQ" at

Posted by erickio (erickio), 27 December 2004
instead of using log_user to trace the output i used it to mask the output. and it seems to work fine now (im getting a diff problem now), but in terms of hanging while displaying the information, my script works. i think the reason it was hanging is that too much information was being displayed and it was making my script crash.

#sid is the spawn_id
#shop is the show command output

global sid shop
set shop ""

send -i $sid "show ip route\n"

expect {
  -i $sid "*\n" {append shop $expect_out(buffer)
  -i $sid "#" {}

send -i $sid "exit\n"

This page is a thread posted to the opentalk forum at and archived here for reference. To jump to the archive index please follow this link.

You can Add a comment or ranking to this page

© WELL HOUSE CONSULTANTS LTD., 2022: Well House Manor • 48 Spa Road • Melksham, Wiltshire • United Kingdom • SN12 7NY
PH: 01144 1225 708225 • FAX: 01144 1225 793803 • EMAIL: • WEB: • SKYPE: wellho