problems with re in binary files
Chris Barker
chrishbarker at home.net
Fri Sep 21 13:18:58 EDT 2001
"Steven D. Arnold" wrote:
> When I opened it in "rb" mode, it started
> working. The manual seems to suggest this is only an issue on some
> operating systems, such as Windows.
yep , that's "b" for "binary", if you want a binary file open it as a
binary file. As it happens, this makes no difference on *nix systems, as
Python's internal line separater happens to be the same as *nix's, but
it's still a good idea to put the b there: for portability and clarity.
-Chris
--
Christopher Barker,
Ph.D.
ChrisHBarker at home.net --- --- ---
http://members.home.net/barkerlohmann ---@@ -----@@ -----@@
------@@@ ------@@@ ------@@@
Oil Spill Modeling ------ @ ------ @ ------ @
Water Resources Engineering ------- --------- --------
Coastal and Fluvial Hydrodynamics --------------------------------------
------------------------------------------------------------------------
More information about the Python-list
mailing list