[Tutor] Re: .....str.count and str.split/solved
tim at johnsons-web.com
Fri May 7 22:01:34 EDT 2004
* Danny Yoo <dyoo at hkn.eecs.berkeley.edu> [040507 15:50]:
> On Fri, 7 May 2004, Tim Johnson wrote:
> Ah! You probably don't need to do anything too special. If you open the
> file in "universal newline" mode, then Python will automagically handle
> platform-specific newline stuff. See:
> Look at the 'U' mode for universal newlines --- I think it should do what
> you want.
I'm currently using ver 2.2 on RH 9.0 --- mode 'rU' is recognized.
I commented out the code that removes '\r'
'\r' remained in the line,
Using "U" throws IOError
I'll read through those doc some more.
Tim Johnson <tim at johnsons-web.com>
More information about the Tutor