f



TCL question

I am trying to split a string into lines. The string contains
embedded
> new lines and I just want to break it into a list of separate lines,
> using the "split' command - page 45 in "Exploring Expect". But it actually splits the string
> into separate words, apparently using the space " " character instead
> of the "\n". I also tried the "\r" but the effect was no different.
>
> The command I used was:
> split $zzz "\n"
>
> Thank you,
>
> > John.

0
JSLEEMAN (3)
8/6/2007 10:50:12 PM
comp.lang.tcl 23429 articles. 2 followers. Post Follow

20 Replies
565 Views

Similar Articles

[PageSpeed] 43

JSLEEMAN@stanfordmed.org wrote:
> I am trying to split a string into lines. The string contains
> embedded
>> new lines and I just want to break it into a list of separate lines,
>> using the "split' command - page 45 in "Exploring Expect". But it actually splits the string
>> into separate words, apparently using the space " " character instead
>> of the "\n". I also tried the "\r" but the effect was no different.
>>
>> The command I used was:
>> split $zzz "\n"
>>
>> Thank you,
>>
>>> John.
> 

What you describe sounds unusual. If you have a string in "zzz" that is 
a bunch of characters split by newlines, [split $zzz "\n"] _will_ split 
on newlines. To wit:

     tclsh % set zzz "this is\nthree lines\nof text"
     this is
     three lines
     of text
     tclsh % split $zzz "\n"
     {this is} {three lines} {of text}

One explanation would be that you've loaded up your own version of a 
command named "split" which differs from the standard Tcl "split" 
command. Could that be possible?

can you show us an example of your data and the actual output you are 
seeing? Also, tell us what you get if you do "info body split". You 
should expect to see the error ""split" isn't a procedure".



-- 
Bryan Oakley
http://www.tclscripting.com
0
oakley (2075)
8/6/2007 11:03:34 PM
On Aug 6, 7:03 pm, Bryan Oakley <oak...@bardo.clearlight.com> wrote:
> JSLEE...@stanfordmed.org wrote:
> > I am trying to split a string into lines. The string contains
> > embedded
> >> new lines and I just want to break it into a list of separate lines,
> >> using the "split' command - page 45 in "Exploring Expect". But it actually splits the string
> >> into separate words, apparently using the space " " character instead
> >> of the "\n". I also tried the "\r" but the effect was no different.
>
> >> The command I used was:
> >> split $zzz "\n"
>
> >> Thank you,
>
> >>> John.
>
> What you describe sounds unusual. If you have a string in "zzz" that is
> a bunch of characters split by newlines, [split $zzz "\n"] _will_ split
> on newlines. To wit:
>
>      tclsh % set zzz "this is\nthree lines\nof text"
>      this is
>      three lines
>      of text
>      tclsh % split $zzz "\n"
>      {this is} {three lines} {of text}
>
> One explanation would be that you've loaded up your own version of a
> command named "split" which differs from the standard Tcl "split"
> command. Could that be possible?
>
> can you show us an example of your data and the actual output you are
> seeing? Also, tell us what you get if you do "info body split". You
> should expect to see the error ""split" isn't a procedure".
>
> --
> Bryan Oakleyhttp://www.tclscripting.com

Also, just a thought, but is it possible that if you take a file, from
say, a Unix environment to a Windows environment without changing the
newline character, that Tcl would fail to recognize it?

0
eric9921 (122)
8/7/2007 11:02:32 AM
On 7 aug, 13:02, EKB <e...@kb-creative.net> wrote:
> On Aug 6, 7:03 pm, Bryan Oakley <oak...@bardo.clearlight.com> wrote:
>
>
>
> > JSLEE...@stanfordmed.org wrote:
> > > I am trying to split a string into lines. The string contains
> > > embedded
> > >> new lines and I just want to break it into a list of separate lines,
> > >> using the "split' command - page 45 in "Exploring Expect". But it actually splits the string
> > >> into separate words, apparently using the space " " character instead
> > >> of the "\n". I also tried the "\r" but the effect was no different.
>
> > >> The command I used was:
> > >> split $zzz "\n"
>
> > >> Thank you,
>
> > >>> John.
>
> > What you describe sounds unusual. If you have a string in "zzz" that is
> > a bunch of characters split by newlines, [split $zzz "\n"] _will_ split
> > on newlines. To wit:
>
> >      tclsh % set zzz "this is\nthree lines\nof text"
> >      this is
> >      three lines
> >      of text
> >      tclsh % split $zzz "\n"
> >      {this is} {three lines} {of text}
>
> > One explanation would be that you've loaded up your own version of a
> > command named "split" which differs from the standard Tcl "split"
> > command. Could that be possible?
>
> > can you show us an example of your data and the actual output you are
> > seeing? Also, tell us what you get if you do "info body split". You
> > should expect to see the error ""split" isn't a procedure".
>
> > --
> > Bryan Oakleyhttp://www.tclscripting.com
>
> Also, just a thought, but is it possible that if you take a file, from
> say, a Unix environment to a Windows environment without changing the
> newline character, that Tcl would fail to recognize it?

Not if you don't touch the translation mode on the file handle using
fconfigure. In that case it will be 'auto' and Tcl will recognize line
separators in all varieties (i.e. win, mac and nix)

Mark

0
mpc.janssen (384)
8/7/2007 11:17:16 AM
On Aug 6, 6:50 pm, JSLEE...@stanfordmed.org wrote:
> I am trying to split a string into lines. The string contains
> embedded new lines and I just want to break it into a list of separate lines,
> using the "split' command - page 45 in "Exploring Expect". But it actually splits the string
> into separate words, apparently using the space " " character instead
> of the "\n". I also tried the "\r" but the effect was no different.
>
> The command I used was:
> split $zzz "\n"

How did the values get into $zzz? How do you know that the string
contains embedded newlines? How do you know that you are getting words
split as space?

The reason I ask is that, for me, when I think I know what a problem
is, and head off to solve it, I discover, eventually, that the problem
was something else altogether.

For instance, sometimes I think lines are going to be separated by
newlines, when in fact, the way I got the lines in converted the
newlines into spaces.

However, in that case, the result would not be a string split at
spaces.

Try this:
 % set zzz "abc\nxyz\n123\n"
abc
xyz
123

 % string length $zzz
12
 % set l [split $zzz "\n"]
abc xyz 123 {}
 % llength $l
4

This is what you should see. If you do not see this, then there's
something not Tcl in your application.  If this is what you see,
however, then try the string length, split, and llength with your
version of zzz, and then tell us what results you are getting...

0
lvirden (1938)
8/7/2007 2:56:36 PM
On Aug 6, 3:50 pm, JSLEE...@stanfordmed.org wrote:
> I am trying to split a string into lines. The string contains
> embedded
>
>
>
> > new lines and I just want to break it into a list of separate lines,
> > using the "split' command - page 45 in "Exploring Expect". But it actually splits the string
> > into separate words, apparently using the space " " character instead
> > of the "\n". I also tried the "\r" but the effect was no different.
>
> > The command I used was:
> > split $zzz "\n"
>
> > Thank you,
>
> > > John.- Hide quoted text -
>
> - Show quoted text -

Thanks for the info so far! More details as follows.
I captured several lines of output in expect_out(buffer) - said "set
zzz $expect_out(buffer)". I did "puts $dbug "$expect_out(buffer)""
where dbug was a file to capture debug output. It was several lines as
expected.
Trying to split a bunch of lines into a list seems like a very common,
ordinary task. But is there some better way? Maybe an array?
The basic problem is that I get a number of lines output in response
to a command, and I need to select one of them. They each start with a
number. I need to select the right line and echo back the number to
the program.
thanks, JS.

0
JSLEEMAN (3)
8/7/2007 6:59:22 PM
JSLEEMAN@stanfordmed.org wrote:
> On Aug 6, 3:50 pm, JSLEE...@stanfordmed.org wrote:
>> I am trying to split a string into lines. The string contains
>> embedded
>>
>>
>>
>>> new lines and I just want to break it into a list of separate lines,
>>> using the "split' command - page 45 in "Exploring Expect". But it actually splits the string
>>> into separate words, apparently using the space " " character instead
>>> of the "\n". I also tried the "\r" but the effect was no different.
>>> The command I used was:
>>> split $zzz "\n"
>>> Thank you,
>>>> John.- Hide quoted text -
>> - Show quoted text -
> 
> Thanks for the info so far! More details as follows.
> I captured several lines of output in expect_out(buffer) - said "set
> zzz $expect_out(buffer)". I did "puts $dbug "$expect_out(buffer)""
> where dbug was a file to capture debug output. It was several lines as
> expected.
> Trying to split a bunch of lines into a list seems like a very common,
> ordinary task. But is there some better way? Maybe an array?

Yes, it is a very common, ordinary task. No, there is not a better way. 
[split $zzz \n] is exactly the tool that you should use. It absolutely 
does what it is documented to do.

You said the command you used was:

    split $zzz "\n"

Are you aware that split does not change zzz, but returns the results as 
a list? If you truly ran the above command exactly as printed, that is 
the problem. You need to do this:

     set list [split $zzz \n]
     puts "zzz as a list is $list"


-- 
Bryan Oakley
http://www.tclscripting.com
0
oakley (2075)
8/7/2007 8:26:00 PM
On Aug 7, 7:17 pm, Mark Janssen <mpc.jans...@gmail.com> wrote:
> On 7 aug, 13:02, EKB <e...@kb-creative.net> wrote:
>
>
>
> > On Aug 6, 7:03 pm, Bryan Oakley <oak...@bardo.clearlight.com> wrote:
>
> > > JSLEE...@stanfordmed.org wrote:
> > > > I am trying to split a string into lines. The string contains
> > > > embedded
> > > >> new lines and I just want to break it into a list of separate lines,
> > > >> using the "split' command - page 45 in "Exploring Expect". But it actually splits the string
> > > >> into separate words, apparently using the space " " character instead
> > > >> of the "\n". I also tried the "\r" but the effect was no different.
>
> > > >> The command I used was:
> > > >> split $zzz "\n"
>
> > > >> Thank you,
>
> > > >>> John.
>
> > > What you describe sounds unusual. If you have a string in "zzz" that is
> > > a bunch of characters split by newlines, [split $zzz "\n"] _will_ split
> > > on newlines. To wit:
>
> > >      tclsh % set zzz "this is\nthree lines\nof text"
> > >      this is
> > >      three lines
> > >      of text
> > >      tclsh % split $zzz "\n"
> > >      {this is} {three lines} {of text}
>
> > > One explanation would be that you've loaded up your own version of a
> > > command named "split" which differs from the standard Tcl "split"
> > > command. Could that be possible?
>
> > > can you show us an example of your data and the actual output you are
> > > seeing? Also, tell us what you get if you do "info body split". You
> > > should expect to see the error ""split" isn't a procedure".
>
> > > --
> > > Bryan Oakleyhttp://www.tclscripting.com
>
> > Also, just a thought, but is it possible that if you take a file, from
> > say, a Unix environment to a Windows environment without changing the
> > newline character, that Tcl would fail to recognize it?
>
> Not if you don't touch the translation mode on the file handle using
> fconfigure. In that case it will be 'auto' and Tcl will recognize line
> separators in all varieties (i.e. win, mac and nix)
>

Indeed, the default -translation auto setting of file channels is a
little gem that I treasure. Not only does it automatically recognise
and convert newlines to tcl's internal "\n" but it recognizes all of
them all the time. So you can even take a mixed newline file like:

unix\n
mac\r
windows\r\n
end

and tcl will still recognise it as four lines. And simply writing out
the file will fix the newline error to the current platform's newline.

On the other hand, forgetting to set -translation binary is how I
usually corrupt binary files (realizing too late only after I
overwrite the original ;-)

0
slebetman (894)
8/8/2007 2:48:56 AM
On Aug 7, 2:59 pm, JSLEE...@stanfordmed.org wrote:
> Thanks for the info so far! More details as follows.
> I captured several lines of output in expect_out(buffer) - said "set
> zzz $expect_out(buffer)". I did "puts $dbug "$expect_out(buffer)""
> where dbug was a file to capture debug output. It was several lines as
> expected.
> Trying to split a bunch of lines into a list seems like a very common,
> ordinary task. But is there some better way? Maybe an array?
> The basic problem is that I get a number of lines output in response
> to a command, and I need to select one of them. They each start with a
> number. I need to select the right line and echo back the number to
> the program.
> thanks, JS.

I have noticed that Expect always returns lines terminated by \r. It
took me some time to split Expect output on new lines. Here is how I
did it:


proc expToList i {
	regsub -all \r $i {} i
	regsub ^\n $i {} i
	set i [split $i \n]
	return $i
}


0
8/8/2007 1:02:27 PM
On Aug 8, 9:02 pm, pn8830 <pnovozhi...@gmail.com> wrote:
> On Aug 7, 2:59 pm, JSLEE...@stanfordmed.org wrote:
>
> > Thanks for the info so far! More details as follows.
> > I captured several lines of output in expect_out(buffer) - said "set
> > zzz $expect_out(buffer)". I did "puts $dbug "$expect_out(buffer)""
> > where dbug was a file to capture debug output. It was several lines as
> > expected.
> > Trying to split a bunch of lines into a list seems like a very common,
> > ordinary task. But is there some better way? Maybe an array?
> > The basic problem is that I get a number of lines output in response
> > to a command, and I need to select one of them. They each start with a
> > number. I need to select the right line and echo back the number to
> > the program.
> > thanks, JS.
>
> I have noticed that Expect always returns lines terminated by \r. It
> took me some time to split Expect output on new lines. Here is how I
> did it:
>
> proc expToList i {
>         regsub -all \r $i {} i
>         regsub ^\n $i {} i
>         set i [split $i \n]
>         return $i
>
> }

Isn't that doing it the hard way? Split already does a good job:

  # split on either \r or \n:
  set i [split $i "\r\n"]

Or do you mean that the lines terminate in CRLF (\r\n)? In which case
you can use the venerable [string map] to normalise newlines:

  set i [split [string map [list "\r\n" "\n"] $i] \n]

but IMHO this really isn't necessary. [split $i \r\n] will simply
generate extra empty lines which can easily be skipped.

0
slebetman (894)
8/8/2007 2:28:47 PM
On Aug 8, 10:28 am, "slebet...@yahoo.com" <slebet...@gmail.com> wrote:
> On Aug 8, 9:02 pm, pn8830 <pnovozhi...@gmail.com> wrote:
> > I have noticed that Expect always returns lines terminated by \r. It
> > took me some time to split Expect output on new lines. Here is how I
> > did it:
>
> > proc expToList i {
> >         regsub -all \r $i {} i
> >         regsub ^\n $i {} i
> >         set i [split $i \n]
> >         return $i
>
> > }
>
> Isn't that doing it the hard way? Split already does a good job:
>
>   # split on either \r or \n:
>   set i [split $i "\r\n"]

Yeah, probably yes but if you split on "\r\n" you will be getting too
many empty elements in the resulting list as you mentioned. In my case
I had empty lines too so things like:

text1\r\n
\r\n
text2\r\n

were turning into:

{text1} {} {} {} {} {text2} {}

>   set i [split [string map [list "\r\n" "\n"] $i] \n]
>
> but IMHO this really isn't necessary. [split $i \r\n] will simply
> generate extra empty lines which can easily be skipped.

I will test this out. But there was another example when Expect was
sending a grep command to parse a file on the remote system which
already had \r\n. I was getting two \r characters at the end of each
line plus \n. So I used a straight forward approach - no matter what
you receive from Expect, remove all \r, split on \n

Cheers,
Pavel.

0
8/8/2007 3:09:52 PM
On Aug 6, 3:50 pm, JSLEE...@stanfordmed.org wrote:
> I am trying to split a string into lines. The string contains
> embedded
>
>
>
> > new lines and I just want to break it into a list of separate lines,
> > using the "split' command - page 45 in "Exploring Expect". But it actually splits the string
> > into separate words, apparently using the space " " character instead
> > of the "\n". I also tried the "\r" but the effect was no different.
>
> > The command I used was:
> > split $zzz "\n"
>
> > Thank you,
>
> > > John.- Hide quoted text -
>
> - Show quoted text -

Thanks for all the very educational material! As this progresses I
found that there are also embedded backspaces (invisible initially)
which showed up in debug output using "od". If I can replace them with
blanks, I think the problem may be nearly solved. I assume that \b
represents a backspace to TCL.

0
JSLEEMAN (3)
8/8/2007 6:10:25 PM
In article <1186596625.547208.199650@g12g2000prg.googlegroups.com>,
 <JSLEEMAN@stanfordmed.org> wrote:
				.
				.
				.
>Thanks for all the very educational material! As this progresses I
>found that there are also embedded backspaces (invisible initially)
>which showed up in debug output using "od". If I can replace them with
>blanks, I think the problem may be nearly solved. I assume that \b
>represents a backspace to TCL.
>

It does.  

\b often arises in Expect discussions, because command-line shells
tend to put all sorts of funny characters in the vicinity of the 
prompt.
0
claird (2363)
8/8/2007 7:39:35 PM
In article <1186585792.898843.70500@o61g2000hsh.googlegroups.com>,
pn8830  <pnovozhilov@gmail.com> wrote:
>On Aug 8, 10:28 am, "slebet...@yahoo.com" <slebet...@gmail.com> wrote:

>>   # split on either \r or \n:
>>   set i [split $i "\r\n"]
>
>Yeah, probably yes but if you split on "\r\n" you will be getting too
>many empty elements in the resulting list as you mentioned. In my case
>I had empty lines too so things like:

Ok, here's a strange new addition to the question....  I've always split
files into a list containing lines using something like

   set f [open foo.bar r]
   set flist [split [read $f] \n\r]
   close $f

No extra blank lines...just the file's content.

If, on the other hand, I set a variable, e.g.,

   set foo "this\n\ris\n\ra test"
   set flist [split $foo \n\r]

I get empty list elements where each \n\r (or \r\n) is in the string.

Why?

Later,
   --jim

-- 
73 DE N5IAL (/4)        | Peter da Silva:  No, try "rm -rf /"
spooky130@cox.net       | Dave Aronson:    As your life flashes before
ICBM / Hurricane:       |      your eyes, in the unit of time known as an
   30.39735N 86.60439W  |      ohnosecond....     (alt.sysadmin.recovery)

0
spooky130 (11)
8/8/2007 7:59:08 PM
spooky130@cox.net wrote:
> Ok, here's a strange new addition to the question....  I've always split
> files into a list containing lines using something like
> 
>    set f [open foo.bar r]
>    set flist [split [read $f] \n\r]
>    close $f
> 
> No extra blank lines...just the file's content.

You know, you should be able to just split on \n as that's what Tcl uses
as a line separator internally (showing our UNIX origins).

> If, on the other hand, I set a variable, e.g.,
> 
>    set foo "this\n\ris\n\ra test"
>    set flist [split $foo \n\r]
> 
> I get empty list elements where each \n\r (or \r\n) is in the string.
> 
> Why?

Firstly, this isn't something you'd get out of [read] under normal
circumstances (see [fconfigure]'s -translation option for why).

Secondly, the second argument to [split] isn't really a string, but
rather a set of characters, all of which are to be split upon equally.
In that situation, when it sees a '\n\r' sequence, it splits on the
first of the two and then on the second. Between them, an empty string,
so you get an empty string in the resulting list.

When I want to split on something more sophisticated, I like to use the
[regexp] command, something like this:

   set flist [regexp -all -inline {[^\r\n]+} $foo]

Donal.
0
8/8/2007 9:30:34 PM
spooky130@cox.net wrote:
> Ok, here's a strange new addition to the question....  I've always split
> files into a list containing lines using something like
> 
>    set f [open foo.bar r]
>    set flist [split [read $f] \n\r]
>    close $f
> 
> No extra blank lines...just the file's content.
> 
> If, on the other hand, I set a variable, e.g.,
> 
>    set foo "this\n\ris\n\ra test"
>    set flist [split $foo \n\r]
> 
> I get empty list elements where each \n\r (or \r\n) is in the string.
> 
> Why?

Probably because your files have lines that end in a simple \n. I'm not 
sure there's any better explanation.


-- 
Bryan Oakley
http://www.tclscripting.com
0
oakley (2075)
8/8/2007 9:32:45 PM
spooky130@cox.net wrote:
> In article <1186585792.898843.70500@o61g2000hsh.googlegroups.com>,
> pn8830  <pnovozhilov@gmail.com> wrote:
>> On Aug 8, 10:28 am, "slebet...@yahoo.com" <slebet...@gmail.com> wrote:
> 
>>>   # split on either \r or \n:
>>>   set i [split $i "\r\n"]
>> Yeah, probably yes but if you split on "\r\n" you will be getting too
>> many empty elements in the resulting list as you mentioned. In my case
>> I had empty lines too so things like:
> 
> Ok, here's a strange new addition to the question....  I've always split
> files into a list containing lines using something like
> 
>    set f [open foo.bar r]
>    set flist [split [read $f] \n\r]
>    close $f
> 
> No extra blank lines...just the file's content.
> 
> If, on the other hand, I set a variable, e.g.,
> 
>    set foo "this\n\ris\n\ra test"
>    set flist [split $foo \n\r]
> 
> I get empty list elements where each \n\r (or \r\n) is in the string.
> 
> Why?
> 

because Tcl is nice to you ;)
when reading from a file, the IO in the Tcl core by default translates
all the different external line endings ("\n" "\r" or "\n\r") into a
single \n internally. And if you write a file all the internal line endings
of \n are written out in the correct platform specific line ending.

so in general, if you are working on Data read a [split $data \n] is
sufficient.

bruce

0
doNOTuse (152)
8/8/2007 9:33:29 PM
On Aug 8, 11:09 pm, pn8830 <pnovozhi...@gmail.com> wrote:
> On Aug 8, 10:28 am, "slebet...@yahoo.com" <slebet...@gmail.com> wrote:
>
>
>
> > On Aug 8, 9:02 pm, pn8830 <pnovozhi...@gmail.com> wrote:
> > > I have noticed that Expect always returns lines terminated by \r. It
> > > took me some time to split Expect output on new lines. Here is how I
> > > did it:
>
> > > proc expToList i {
> > >         regsub -all \r $i {} i
> > >         regsub ^\n $i {} i
> > >         set i [split $i \n]
> > >         return $i
>
> > > }
>
> > Isn't that doing it the hard way? Split already does a good job:
>
> >   # split on either \r or \n:
> >   set i [split $i "\r\n"]
>
> Yeah, probably yes but if you split on "\r\n" you will be getting too
> many empty elements in the resulting list as you mentioned.

Why is too many empty elements an issue at all?

> In my case I had empty lines too so things like:
>
> text1\r\n
> \r\n
> text2\r\n
>
> were turning into:
>
> {text1} {} {} {} {} {text2} {}

You're already getting too many empty elements using your convoluted
method anyway and need to skip them. Sikpping 1 empty element or 10
makes little difference. Unless of course, empty lines mean something.
If you're talking about a file I'd agree but you're talking about
unperdictable program output gathered from Expect, in which case empty
lines should not have meaning.

0
slebetman (894)
8/9/2007 1:57:01 AM
In article <_Bqui.42230$7c.9713@fe2.news.blueyonder.co.uk>,
Donal K. Fellows <donal.k.fellows@manchester.ac.uk> wrote:
>spooky130@cox.net wrote:

>>    set flist [split [read $f] \n\r]

>You know, you should be able to just split on \n as that's what Tcl uses
>as a line separator internally (showing our UNIX origins).

Yeah....  :-)   I actually didn't know that Tcl handled \r on its own
just by using \n until I read it in this thread today ... I'd always
assumed that 'dog and 'doze files would need special handling since
they're different from the norm (that, of course, being your favorite
Unix variant <grin> ... mine being pretty much any BSD variant...from
there, I'm not as picky...BSD on the old DEC VAXes---can't remember
what it was called, SunOS 4.x, my old Linux machine---custom build from
bits and pieces before there even were any Linux distributions, and
now FreeBSD...that's been the progression for me to date).

>Firstly, this isn't something you'd get out of [read] under normal
>circumstances (see [fconfigure]'s -translation option for why).

No need...the word "translation" says enough.  :-)    Should have
considered the insanely obvious....

>Secondly, the second argument to [split] isn't really a string, but
>rather a set of characters, all of which are to be split upon equally.

Now THAT I knew---I'd made another bad assumption about \n\r which
more or less CANXd my first assumption.  Don't ask...I'm too busy
feeling stupid right now to answer.  :-)

Thanks....

Later,
   --jim

-- 
73 DE N5IAL (/4)        | DMR: So fsck was originally called
spooky130@cox.net       |      something else.
< Running FreeBSD 6.1 > | Q:   What was it called?
ICBM / Hurricane:       | DMR: Well, the second letter was different.
   30.39735N 86.60439W  |    -- Dennis M. Ritchie, Usenix, June 1998.


0
jim220 (1)
8/9/2007 2:31:20 AM
In article <1186585792.898843.70500@o61g2000hsh.googlegroups.com>,
pn8830  <pnovozhilov@gmail.com> wrote:
			.
			.
			.
>I will test this out. But there was another example when Expect was
>sending a grep command to parse a file on the remote system which
>already had \r\n. I was getting two \r characters at the end of each
>line plus \n. So I used a straight forward approach - no matter what
>you receive from Expect, remove all \r, split on \n
			.
			.
			.
Pavel, <URL: http://wiki.tcl.tk/2958 > might interest you.
0
claird (2363)
8/9/2007 1:20:24 PM
On Aug 8, 9:57 pm, "slebet...@yahoo.com" <slebet...@gmail.com> wrote:
> On Aug 8, 11:09 pm, pn8830 <pnovozhi...@gmail.com> wrote:
> > text1\r\n
> > \r\n
> > text2\r\n
>
> > were turning into:
>
> > {text1} {} {} {} {} {text2} {}
>
> You're already getting too many empty elements using your convoluted
> method anyway and need to skip them. Sikpping 1 empty element or 10
> makes little difference. Unless of course, empty lines mean something.
> If you're talking about a file I'd agree but you're talking about
> unperdictable program output gathered from Expect, in which case empty
> lines should not have meaning.

Hi,
What do you mean by skipping empty lines? Does it mean that anywhere I
want to use the resulting list I should implement a check if element
is empty like if {$listElement != ""} ? I consider that a little
inconvenient since I have to care about it each time. I think it's
easier to get rid of empty elements once and for all.

The other question is does it matter from the performance point of
view?

The other thing I learned about Expect is the more your script can
predict  the easier is your life. You're right that sometimes Expect
returns junk just because the remote system responded not as expected.
So in many cases I had to analyze expect_out(buffer) to get data
needed for the next step and instead of trying to skip empty lines
with _if_ I thought it's easier to create a proc that would take care
of it.

Thanks,
Pavel.

0
8/9/2007 1:38:26 PM
Reply:

Similar Artilces:

tcl-gaul: Genetic Algorithms for Tcl. (Tcl package)
This is an announcement for a relatively new Tcl project: tcl-gaul Tcl-gaul is a Tcl extension for genetic/evolutionary algorithm processing.It relies on the GAUL library: http://gaul.sourceforge.net/ * A genetic algorithm (GA) is a search technique used in computing to find exact or approximate solutions to optimization and search problems. Genetic algorithms are categorized as global search heuristics. They are a particular class of evolutionary algorithms that use techniques inspired by evolutionary biology such as inheritance, mutation, selection, and crossover. For an introduction to genetic algorithms visit: http://gaul.sourceforge.net/intro.html Platform: Linux (GAUL library dependency) Home page: http://sourceforge.net/projects/tcl-gaul/ Man page: http://tcl-gaul.sourceforge.net/ Author: Alexandros Stergiakis alsterg ...

tcl-pam: PAM authentication for Tcl (Tcl package)
This is an announcement for a relatively new Tcl project: tcl-pam Tcl-pam is a Tcl interface to the PAM* service of Linux. It provides a Tcl package that allows Tcl scripts to use PAM to authenticate users and programs. It relies on linux-pam library: http://www.kernel.org/pub/linux/libs/pam/ * PAM (Pluggable Authentication Modules): A mechanism to integrate multiple low−level authentication schemes into a high−level application programming interface (API). This enables programs that rely on authentication to be written independently of the underlying authentication scheme. Platform: Linux Home page: http://sourceforge.net/projects/tcl-pam/ Man page: http://tcl-pam.sourceforge.net/ Author: Alexandros Stergiakis alsterg ...

tcl-mmap: A POSIX mmap interface for Tcl. (Tcl package)
This is an announcement for a relatively new Tcl project: tcl-mmap Tcl-mmap is a Tcl interface to the POSIX mmap* system call. It provides a Tcl package that allows Tcl scripts to: 1) Memory map files for improved access efficiency; 2) Share memory between related processes; 3) Easily implement cyclic persistent log files. * See the mmap(2) man page. Platform: Linux/Unix Home page: http://sourceforge.net/projects/tcl-mmap/ Man page: http://tcl-mmap.sourceforge.net/ Author: Alexandros Stergiakis On Sep 3, 11:48=A0am, Alexandros Stergiakis <alst...@gmail.com> wrote: > This is an announcement for a relatively new Tcl project: tcl-mmap > > Tcl-mmap is a Tcl interface to the POSIX mmap* system call. It provides > a Tcl package that allows Tcl scripts to: 1) Memory map files for > improved access efficiency; 2) Share memory between related processes; > 3) Easily implement cyclic persistent log files. > > * See the mmap(2) man page. > Great to see this and the other packages you made. Looking at the manpage it looks a bit misformatted before the usage example. Any specific reason to use GPL for this instead the usual Tcl/MIT/BSD style license used? Michael schlenk wrote: > On Sep 3, 11:48 am, Alexandros Stergiakis <alst...@gmail.com> wrote: >> This is an announcement for a relatively new Tcl project: tcl-mmap >> >> Tcl-mmap is a Tcl interface to the POSIX mmap* system call. It provides >> a Tcl package that...

tcl-mq: POSIX Message Queues for Tcl. (Tcl package)
This is an announcement for a relatively new Tcl project: tcl-mp Tcl-mp is a Tcl interface to POSIX Message Queues*. It provides a Tcl package that allows scripts to create/open/close/unlink multiple parallel message queues, and to send/receive messages synchronously and asynchronously to/from them. * A POSIX message queue is an Inter-Process Communication mechanism available on Linux and some other POSIX-compliant operating systems. It allows to or more processes (or threads) to communicate under the same OS. The messages are buffered by the kernel, which gives them kernel persistency. A message queue can be thought of as a linked list of messages. Threads with adequate permission can put messages onto the queue, and threads with adequuate permission can remove messages from the queue. Each message is assigned a priority by the sender, and the oldest message of highest priority is always retrieved first. Unlike PIPES and FIFOS, no requirement exists that someone be waiting for a message to arrive on a queue, before some process writes a message to that queue. It's not even a requirement for both processes to exist at the same time. Read mq_overview(7) for more details Platform: Linux Home page: http://sourceforge.net/projects/tcl-mp/ Man page: http://tcl-mp.sourceforge.net/ Author: Alexandros Stergiakis alsterg On Sep 3, 11:37=A0am, Alexandros Stergiakis <alst...@gmail.com> wrote: > This is an announcement for a relatively new Tcl pro...

tcl-syslog: Unix system logging for Tcl (Tcl package)
This is an announcement for a relatively new Tcl project: tcl-syslog Tcl-syslog is a Tcl interface to the *nix syslog service. It provides a Tcl package that allows Tcl scripts to log messages to syslog. Platform: Linux/Unix Home page: http://sourceforge.net/projects/tcl-syslog/ Man page: http://tcl-syslog.sourceforge.net/ Author: Alexandros Stergiakis alsterg ...

tcl-snmptools: SNMP v1/v2/v3 operations for Tcl. (Tcl package)
This is an announcement for a relatively new Tcl project: tcl-snmptools Tcl-snmptools is a Tcl interface to the Net-SNMP library which provides operations for the management of remote SNMP agents. It supports all the standard SNMP v1/v2/v3 operations: connect, close, get, set, getnext, walk, bulkget, bulkwalk, trap, translate and others. It is currently in a functional state, but more work and testing needs to be done. Home page: http://sourceforge.net/projects/tcl-snmptols/ Man page: http://tcl-snmptols.sourceforge.net/ Author: Alexandros Stergiakis alsterg ...

Opening a TCL program from within another TCL program in ANSYS Tcl-Tk
Hi everyone, I have been pulling my hair with this one for a couple of days and still have not found a fix. I'm working within ANSYS Tcl-Tk implementation. I created a Tcl-Tk script that generates a simple window with three buttons. Each button opens another window which is created in a separate Tcl file. The second window have a lot of text entries, variables, procedures, etc. I can open the second Tcl file by itself and everything works as supposed, but when I open it using the button in the first window, it opens but any procedure called by the widgets on the second window are not found... Here's the deal... Since I'm working within the ANSYS implementation of Tcl-Tk, I'm actually using an ANSYS command to open the second window. The command I use is: ### ans_sendcommand ~eui,'source O:/mad_projects_2/ANSYS/Macros/ IBR_CAS.tcl' ### It actually sends a command back to ANSYS telling it to execute a Tcl command... I know this is not pretty but its the only way i was able to make it at least show the window. ############################## #Main Tcl (excerpt): ############################## namespace eval Tools { proc IBRCambpell {} { #source O:/mad_projects_2/ANSYS/Macros/IBR_CAS.tcl ans_sendcommand ~eui,'source O:/mad_projects_2/ANSYS/Macros/ IBR_CAS.tcl' } proc viewManager {} { ans_sendcommand ~eui,'source O:/mad_projects_2/ANSYS/Macros/ ViewManager.tcl' } proc powerAnnotation {} { ans_sendcommand ~eui,'source ...

How to compile tcl or encrypt tcl
I use TclPro1.5 to compile my tcl script with tixwish in the Solaris before. But I cannot use the same method in Linux. Why? Is there any utility for me to compile or encrypt the code by using tixwish? The following is the simple code if I use the tixwish: #!/home/albertl/local/bin/tixwish puts "haha" And after using procomp by the TclPro1.5 Error in startup script: The TclPro ByteCode Loader is not available or does not support the correct version while executing "error "The TclPro ByteCode Loader is not available or does not support the correct version"" invoked from within "if {[catch {package require tbcload 1.3} err] == 1} { error "The TclPro ByteCode Loader is not available or does not support the correct version" ...." (file "a.tbc" line 4) The problem seems that tbcload1.3 cannot be found? But tbcload is already there "/home/albertl/local/lib/tbcload1.3" Why? Can anyone tell me? stratus schrieb: > I use TclPro1.5 to compile my tcl script with tixwish in the Solaris before. > But I cannot use the same method in Linux. Why? > > Is there any utility for me to compile or encrypt the code by using tixwish? > Tixwish is just a wish shell with the Tix package baked in. If TclPro does not have a specific bigwish with Tix included your out of luck on that road (but could build your own if you liked). You might have success with freewrap or TDK, don't know for su...

tcl application with tcl application
Here is another question, I have one tcl-based application A, my co- worker has a tcl-based application B. Now I want to integrate my application A into the application B. After integration, I want to be able to run A's tcl command in B. Assume I can only change A's code, is there any way to do this? On 17 Dez., 07:03, teacupfull business <teacupfull.busin...@gmail.com> wrote: > Here is another question, I have one tcl-based application A, my co- > worker has a tcl-based application B. Now I want to integrate my > application A into the application B. >...

How Tcl speaks for itself and how Tcl is not spoken for...
Hello It's Friday and... well... Two things about Tcl going through my mind this week, a nice anecdote and a eyebrow-rising thing on Wikipedia: Anecdote: Until three months ago I worked in a scientific institue where I wrote much software in Tcl, especially a big Build and Report System, some tools for automatic checking of coding style and other things. Tcl had a bad reputation there (not because of me... they dropped Tcl before I started there in favour of Joy, then JavaScript and now Python) and besides me, there was only one co-worker who appearantly writes some small Tcl-Scripts to support other researchers in their work. To get completely rid of Tcl, they even started to reimplement all things, I wrote in Tcl in Python just to have it in a language, that most of them know (which is a good decision on the one hand, but on the other hand, I think, it would be better to simply learn Tcl ;-), which made me a little bit sad. Now there is a new collegue who has to maintain some of the things I wrote. Comming from Perl he wasn't exactly enthusiastic when he heard, that he must maintain my old code in such an obscure language.. Two weeks ago, I got mail from him. He's just studying a complex system of scripts that are used for a sandboxed build system for source code which comes from external untrusted source and must be compiled and tested. Of course it's written in Tcl (and some bash-Scripting). He told me, that although he has never looked at Tcl before,...

Extending TCL in C with tcl.h - Disabliing [<tcl-cmd>] feature
Hi, TCL has a command execution syntax like this: [<tcl cmd>] Anything inside the 3rd bracket will be executed as a Tcl command by the Tcl interprater. Is there any way I can disable/delete this Tcl construct [ <tcl-cmd>]? In other words, my Tcl interprator should print "[32]" for tcl command puts "[32]" It should not try to treat [] as a special character. Is this any way possible while extending Tcl in C with tcl.h? Thank you, Arijit * arijit79@gmail.com | puts "[32]" | | It should not try to treat [] as a special character. Check out the TCL quoting rules. http://www.tcl.tk/man/tcl8.4/TclCmd/Tcl.htm http://www.tcl.tk/man/tcl8.4/TclCmd/Tcl.htm#M10 http://www.tcl.tk/man/tcl8.4/TclCmd/Tcl.htm#M15 Any of puts {[32]} puts "\[32\]" will do the trick. R' On May 8, 3:14 am, ariji...@gmail.com wrote: > Is there any way I can disable/delete this Tcl construct [ <tcl-cmd>]? By doing this, you would disable the primary functionality of Tcl. I'm certain you could go into the tcl source and stop it - but why not talk about what you are really trying to do. Perhaps someone can give you a better way of doing what you are wanting to do. ...

Tcl
Hello all. I found on hobbes the afaik latest Tcl for Os/2 v8.35 Is there any newer port, cause i try to update the eggdrop and that says: Your Tcl version is much too old for Eggdrop to use. You should download and compile a more recent version. The most reliable current version is 8.5.X and can be downloaded from ftp://tcl.activestate.com/pub/tcl/tcl8_5/. -- With the best regards from the Netherlands, Tu, "Tellerbop" <Tellerbop@wint.nl>, hai scritto questo in data Wed, 14 Jan 2009 19:11:18 UTC: > Hello all. > > I found on hobbes the afaik latest Tcl for Os/2...

Tcl
Hello, where can I see for tcl syntacs and how-to run a tcl test? Thank You Vittore ___________________________________ Yahoo! Mail: gratis 1GB per i messaggi e allegati da 10MB http://mail.yahoo.it ---------------------------------------------------------------------------- Posted to the ptolemy-hackers mailing list. Please send administrative mail for this list to: ptolemy-hackers-request@ptolemy.eecs.berkeley.edu ...

TCL
Hello, i would like to build TCL/TK as a separate DLL-Library. Can anyone tell me how this can be done with VC 6.0? Best regards, Reinhold "Reinhold.kwauka" <bernd-reinhold.kwauka@t-online.de> wrote: >Hello, > >i would like to build TCL/TK as a separate DLL-Library. Can anyone tell me >how this can be done >with VC 6.0? > >Best regards, >Reinhold > 1) get the source from http://tcl.sourceforge.net/ 2) open a command prompt 3) cd to the win/ subdirectory 4) call vcvars32.bat located in ??\vc98\bin\ of vc6 for wherever you installed it. 5) type @ the prompt: nmake -f makefile.vc -- David Gravereaux <davygrvy@pobox.com> [species: human; planet: earth,milkyway(western spiral arm),alpha sector] Reinhold.kwauka wrote: > Hello, > > i would like to build TCL/TK as a separate DLL-Library. Can anyone tell me > how this can be done > with VC 6.0? > > Best regards, > Reinhold > > Its already done. Just download a binary release for windows and check \Program Files\Tcl\lib for the DLLs and static libraries. ...

MS Dictation and TCL
I'm trying to use the MS dictation tool while in TCL 8.5 program. The text starts to appear, but then the program crashes. It would be great to find a way to make this work. Thanks! Barney Tcl 8.5 (wish 8.5) makeindex (12/14/2007) MSWinXP sp3 plenty of ram and storage ...

Tcl extension: check Tcl version?
Is there a recommended way to check if a (binary) Tcl extension is loaded to the same Tcl version that was used for linking the extension? Currently I'm encountering a problem with an extension that I have built (and linked) with libtk8.3.so and that can be loaded under wish8.5 as well (without re-bulding, using package require). A number of newly provided commands work well in spite of the version mixture, but others don't, and wish8.5 crashes when these commands are used. Is this behavior normal, i.e. should I check that compile-time version and run-time version are identical? Or does this indicate some subtle coding problem? Thanks for any suggestions Olaf Olaf Dietrich wrote: > Is there a recommended way to check if a (binary) Tcl extension > is loaded to the same Tcl version that was used for linking > the extension? > > Currently I'm encountering a problem with an extension that > I have built (and linked) with libtk8.3.so and that can be > loaded under wish8.5 as well (without re-bulding, using > package require). A number of newly provided commands work > well in spite of the version mixture, but others don't, and > wish8.5 crashes when these commands are used. > > Is this behavior normal, i.e. should I check that compile-time > version and run-time version are identical? Or does this > indicate some subtle coding problem? Not subtle. Major problem. DO NOT DO THAT. If you want to be loadable across mult...

[TCL] diff type operations in TCL
I didn't see anything in tcllib and thus far haven't turned up anything that looks like it will work. I would like to know if there is a TCL package, or already written procedure, that will do a simple diff of two files and tell me if they're the same or if they have differences. Is there anything like this? --------------------------------------------- Andrew R. Falanga (a non-HP employee) Hewlett-Packard Company 11311 Chinden Blvd. Boise, Idaho --------------------------------------------- Please note: The e-mail address is purposely mangled. I do not wish my account at HP to become a spam haven. Andrew Falanga wrote: > I didn't see anything in tcllib and thus far haven't turned up anything > that looks like it will work. I would like to know if there is a TCL > package, or already written procedure, that will do a simple diff of two > files and tell me if they're the same or if they have differences. > > Is there anything like this? If all you want to know is if they are different, then: set fd [open $file1 r] set f1 [read $fd] close $fd set fd [open $file2 r] set f2 [read $fd] close $fd if {[string equal $f1 $f2]} then { puts "'$file1' and '$file2' are the same." } else { puts "'$file1' and '$file2' are different." } -- +--------------------------------+---------------------------------------+ | Gerald W. Lester ...

Inline::Tcl vs. Inline::Tcl
The readme for CPAN's Inline::Tcl says this: > This module is not related to the Inline::Tcl module, but it might be > valuable to have some compatibility between the two. > This sentence seems to suggest that there is another module named Inline::Tcl somewhere. Is this true, and if so, where can I find it? Mumia W. wrote: > The readme for CPAN's Inline::Tcl says this: > > > This module is not related to the Inline::Tcl module, but it might be > > valuable to have some compatibility between the two. > > > > This sentence seems to suggest ...

Debugger for Tcl/Tk and [incr Tcl]
hi, where can i get Coverage for debugging tcl/tk, [incr Tcl] source? this tool is advised to use in 'Practical Programming in Tcl and Tk' or any other good debugger, which i could use? best, s. On Jan 23, 5:56=A0am, Sitaca <sit...@gmail.com> wrote: > hi, > > where can i get Coverage for debugging tcl/tk, [incr Tcl] source? > this tool is advised to use in 'Practical Programming in Tcl and Tk' > > or any other good debugger, which i could use? I see, at http://wiki.tcl.tk/8638 , a brief reference to the topic of coverage for tcl. I don't know whether or not any of the tools mentioned include coverage of itcl. On 23 jan, 12:52, "Larry W. Virden" <lvir...@gmail.com> wrote: > On Jan 23, 5:56=A0am, Sitaca <sit...@gmail.com> wrote: > > > hi, > > > where can i get Coverage for debugging tcl/tk, [incr Tcl] source? > > this tool is advised to use in 'Practical Programming in Tcl and Tk' > > > or any other good debugger, which i could use? > > I see, athttp://wiki.tcl.tk/8638, a brief reference to the topic of > coverage for tcl. I don't know whether or not any of the tools > mentioned include coverage of itcl. I have a more complete version of the coverage tool mentioned on that page. I just never got around to publishing it more widely. As for debuggers: the Wiki has a lot of pointers on that subject as well. Regards, Arjen Larry W. Virden wrote:...

How Tcl source finds init.tcl???
Hi, I have one question about how Tcl finds init.tcl. What environment variable does Tcl source use to get the search path for init.tcl? Is there any way to specifically use init.tcl from a certain path? Thanks a lot in advance! Lihong lihong pei wrote: > I have one question about how Tcl finds init.tcl. > What environment variable does Tcl source use to get the search path for > init.tcl? If the environment variable TCL_LIBRARY exists, it's value is assumed to be a single directory which is added to the search path for init.tcl. Note that this is offered mostly as a way for...

dynamic call of tcl proc from tcl
Hello, I would like to invoce a tcl proc from a line of tcl where I have a proc name and a list variable of arguments. eg. % callproc $procName $argList where: ..callproc - TCL Procedure for dynamically calling procedures ..procName - Name of procedure to be called in a string ..argList - List of Arguments My goal is to avoid creating a procedure call as a string and evaluating it as there are many potential pitfalls with using evals in such a way. Thanks, JsD Java script Dude wrote: > I would like to invoce a tcl proc from a line of tcl where I have a > proc name and a list variable of arguments. > > eg. % callproc $procName $argList > > where: > .callproc - TCL Procedure for dynamically calling procedures > .procName - Name of procedure to be called in a string > .argList - List of Arguments Except for error/exception handling, the answer is: proc callproc {cmd argList} { uplevel 1 [linsert $argList 0 $cmd] } -- | Don Porter Mathematical and Computational Sciences Division | | donald.porter@nist.gov Information Technology Laboratory | | http://math.nist.gov/~DPorter/ NIST | |______________________________________________________________________| [; Thanks Don ;] ...

[TCL] multi-threaded tcl apps
Hi, Where can one find complete documentation on the ttrace package to the Thread package? I'd like to know what commands are available in ttrace and how to use them. --------------------------------------------- Andrew R. Falanga (a non-HP employee) Hewlett-Packard Company 11311 Chinden Blvd. Boise, Idaho --------------------------------------------- Please note: The e-mail address is purposely mangled. I do not wish my account at HP to become a spam haven. If you wish to e-mail me, the address consists of a dot between my first and last names (excluding my middle initial). The rest is accurate. Also, note, responses must be within the given context of messages I've posted to usenet. If it's not, I WILL NOT RESPOND! ...

Tcl command to evaluate a tcl script?
Hi all, I need to evaluate a separate tcl file within a tcl file. Is there any tcl command to evaluate a tcl file ? Regards, Prabu.K prabu wrote: > Hi all, > > I need to evaluate a separate tcl file within a tcl file. Is there any > tcl command to evaluate a tcl file ? > > Regards, > Prabu.K > hi, try: source your_other_tcl_file.tcl cheers, Tobi ...

Possible bug in Tcl or Windows or Tcl on Windows
Hi, There seems to be a bug in the way numbers are compared in Tcl. Consider the below script for calculating Pythagorean triplets. For hypotenuse upto a value of 100, there should have been 63 unique triplets. On Windows XP the script detects only 62. The script doesn't detect the case where c=99, b=20 ==> a=101. However running the same script under Tcl 8.4.1 in Cygwin detects 63 triplets. I don't have a Linux machine at hand to test it there. Following is the script and relevant output. Could anyone shed some light on the cause of this. Maybe it has something to do with how the numbers are represented internally? Running the script for N>100 shows up many more such missed values. An equivalent program in C runs correctly on the same machine. C code was compiled using both gcc and VC++6.0. ######################################################################### # a^2 = b^2 + c^2 proc pythag {MAX} { set i 0 for {set c 2} {$c <= $MAX} {incr c} { for {set b 1} {$b < $c} {incr b} { set a [expr hypot($c, $b)] ;# Calc. Hypot if { ($c == 99) && ($b == 20)} { ;# <<<<<<<< puts ">> [expr round($a)] == $a" } if {[expr round($a)] == $a} { puts "$a : $b : $c" incr i } } } return $i } if {$argc == 1} { set MAX [lindex $argv 0] } else { puts stderr "Usage: tclsh $argv0 N" exit } puts [pythag $MAX] ############# OUTPUT ################ Tcl 8.4.1 (Cygwi...

Web resources about - TCL question - comp.lang.tcl

West Lothian question - Wikipedia, the free encyclopedia
He illustrated his point by pointing out the absurdity of a Member of Parliament for West Lothian being able to vote on matters affecting the ...

World Science Festival Brisbane 2016: Questions abound in learning extravaganza
Are humans on the verge of destroying our planet? Is creativity linked to insanity? And just when are we finally going to be whizzing around ...

Nico Rosberg and Formula One's biggest question ... can he beat Hamilton?
Formula one's biggest question. Can Nico Rosberg beat Lewis Hamilton?

Experts question effectiveness of Xenophon's reforms to foreign investment laws
Nick Xenophon says current foreign investment laws are as clear as mud and weak as water.

Yahoo! Board Seats ‘Perplex’ SunTrust; ‘Fiduciary Duty’ in Question
SunTrust Robinson Humphrey ’s Robert Peck this morning follows up on the announcement by Yahoo! ( YHOO ) this morning that it has appointed two ...

I assume we're dealing with burst photography, so the question is: Why choose this particular instant ...
Everyone was just talking about that wonderful photograph that Christopher Horner captured at a Pittsburgh Pirates baseball game last Saturday. ...

Florida governor kicked off 'Morning Joe' after dodging questions about Trump's latest inflammatory statement ...
Florida Gov. Rick Scott was kicked off of MSNBC's "Morning Joe" on Thursday after he refused to directly answer a question about GOP frontrunner ...

Questions linger after mom says 4-year-old son shot her in truck
Questions linger after mom says 4-year-old son shot her in truck

‘Foolish and Impractical’: Security Experts Question Trump’s Mexico Wall Proposal
Donald Trump’s proposal to build a wall along the southwest border Mexico would decrease delicate bilateral border security cooperation, set ...

Wake up Texas. Houston. It's not a question of if. The question is when.
Willful passivity and political cowardice can be a real and present danger to our lives. Few of us in the Galveston/Houston area will ever forget ...

Resources last updated: 3/13/2016 2:00:58 PM