Tutorial on File and Directory Access in Python (2007)

 

 

... The default mode of Python in reading a file is to assume it is a text file. Whenever an EOL marker is encountered, it will be converted to ‘\n’, i.e. 0xa. This would of course be no problem on Unix platforms, since it would involve no change at all, but under Windows, if the file were actually a binary file and simply by coincidence contained some 0xda pairs, one byte from each pair would be lost, with potentially disastrous consequences. So, you must warn the system if it is a binary file. [via]
http://heather.cs.ucdavis.edu/~matloff/Python...

Rating: 0/10

 

 

Tags: Tag python, Tag tutorial, ...

 

Related Files

 

 
Sponsored Links
Free Download Amcor Manual, Guide, Instructions, available in PDF ebooks format.
Tutorial on File and Directory Access in Python

Rate this Document

ADS

 

Tag Clouds

 

Last Download

 

BookShelf