Newbie: What's wrong with this 6-line script?

Larry Bates lbates at
Fri Jun 4 01:44:07 CEST 2004

A known problem in the interpreter.  If
output lines get too long the "disappear".
If you scroll right with mouse by clicking
the right arrow, you will see the line
"magically" appear.

Larry Bates
Syscon, Inc.

"Brent W. Hughes" < at> wrote in message
news:8COvc.4324$%F2.43 at attbi_s04...
> If the file Test1.txt contains 257 words, the following script works as
> you'd expect.  But if Test1.txt contains 258 words, the last line of the
> script prints a blank line instead of the words.
> ==========================
> import sys
> f = file("Test1.txt")
> s =
> f.close()
> t = s.split()
> print t
> ===========================
> BTW, if I run these same lines in the Python interactive shell, it will
> fine even with 20000 words in Test1.txt.
> Is there something simple I don't understand?
> Brent

More information about the Python-list mailing list