For Programmers: Free Programming Magazines  


Home > Archive > Tcl > May 2007 > Re: TK/Expect causes BEEP bacause of <CTL> chars, need to disable or filter <









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Re: TK/Expect causes BEEP bacause of <CTL> chars, need to disable or filter <
Glenn Jackman

2007-05-25, 7:09 pm

At 2007-05-25 02:15AM, "dopeAddict@fukdup.com" wrote:
> Basically, Expect is sending strings to the user (in the expect_out(buffer))
> with a certain <CTL> char. Later I use some of the strings to send back to
> the device through expect, but expect (or TK, or the OS) doesn't like the
> <CTL chars> and beeps for every char (millions of beeps).


What else are you doing with those strings? Writing them to a log file?
Are you printing them to the screen with puts or send_user? I suspect
they are Ctl-G (the ascii BEL character)

I assume the functionality is working as expected but the only annoyance
is the beeping.


--
Glenn Jackman
"You can only be young once. But you can always be immature." -- Dave Barry
danielk@hereIam.com

2007-05-25, 7:09 pm

Yes, I set log_user to "1" when I debug, but I've tried it with log_user "0"
and still hear the bell. Yes, the program works, but if I send a command and
it fails for some (legitimate) reason I hear the bell and when I login to
the device through telnet/expect, the login banner at the device through
telnet expect has the vertcal bar at the end of every line (I think CTL-G)
and in the middle of some lines. If I telnet to the same device without
using expect I do not see the CTL chars in the telnet sesion, only the
telnet/expect session.

Maybe some term config setting or something. What about stderr, is there any
way to change this to remove the bell on error? I'll try anythng. I will
play with log_user and see if it helps but I remember trying this a while
back but I've made other changes since then so it's worth trying again.
- Daniel

--
Posted via a free Usenet account from http://www.teranews.com

Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com