Mailing List Archive
tlug.jp Mailing List tlug archive tlug Mailing List Archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]Re: [tlug] running python script
- Date: Tue, 31 Aug 2004 13:07:40 +0900
- From: Jim Tittsler <jwt-tlug@example.com>
- Subject: Re: [tlug] running python script
- References: <opsdi80y0e0fabl5@example.com> <opsdjamjjv0fabl5@example.com> <opsdkue5cl0fabl5@example.com>
On Aug 31, 2004, at 12:24, Shawn wrote: > The files which were written under *nix had a windows line ending, but > apparently the app using them expected that. Looking at the script > though...seemed ok. > > I guess the best would have been for the original writer to just have > checked the last two chars of the line and it would work for both. Another alternative would have been to open the files with open("filename.txt", 'rU') which puts the file object into "universal newline mode." That attempts to hide DOS, Macintosh, and Unix line endings from you... making them all into '\n'. -- Jim Tittsler 7J1AJH/AI8A GPG: 0x01159DB6 Kanto Computer Calendar http://www.OnJapan.net/calendar/ Python Starship http://Starship.Python.net/
- Follow-Ups:
- Re: [tlug] running python script
- From: Shawn
- References:
- [tlug] running python script
- From: Shawn
- Re: [tlug] running python script
- From: Shawn
- Re: [tlug] running python script
- From: Shawn
Home | Main Index | Thread Index
- Prev by Date: Re: [tlug] running python script
- Next by Date: Re: [tlug] running python script
- Previous by thread: Re: [tlug] running python script
- Next by thread: Re: [tlug] running python script
- Index(es):
Home Page Mailing List Linux and Japan TLUG Members Links