
Chris Barker <chrishbarker@home.net>:
It took me WAY too long to figure out that I had read the file in text mode.
My favourite way of falling into that trap involves AUFS (the Appleshare Unix File Server). You're browsing the web on a Unix box and come across a juicy-looking Stuffit file. You download it into your AUFS directory, hop over to the Mac and feed it to Stuffit Expander, which promptly throws a wobbly. "Shazbot," you mutter, "it got corrupted in the download somehow." You try a couple more times, with the same result. You're just about to write to the web site maintainer telling them that their file is corrupt, when it dawns on you that: (a) AUFS performs CR/LF translation on files whose Mac type code is 'TEXT'; (b) Unix-created files default to type 'TEXT'. (Sorry, not really Python-related. Pretend you've implemented your Stuffit expander in Python...) Greg Ewing, Computer Science Dept, +--------------------------------------+ University of Canterbury, | A citizen of NewZealandCorp, a | Christchurch, New Zealand | wholly-owned subsidiary of USA Inc. | greg@cosc.canterbury.ac.nz +--------------------------------------+