Some Python 2.1 ideas
dsh8290 at rit.edu
Wed Dec 27 19:19:04 EST 2000
Yeah, it is a problem if you don't know where the file came from. How
about creating a standard text file format? All files could be opened
in binary mode on all platforms, then EOL is handled by each
application (or better yet make a standard module that does the
implementation correctly once).
Seriously, I think that redesigning text files would be best. You
don't have a problem reading a jpeg or mp3, regardless of the system
it came from and the system it is being used on. Why should plain
text files be any different? Plain text files should be the simplest
of all, but alas they are not.
On Wed, Dec 27, 2000 at 01:28:22PM -0700, Bjorn Pettersen wrote:
> Which would be wrong, since the file you're reading doesn't necessarily come
> from the platform you're running on... (otherwise os.linesep would work).
> -- bjorn
More information about the Python-list