[pygr-notify] Issue 60 in pygr: (patch) windows platform needs a 'b' flag to indicate binary formats
codesite-noreply at google.com
codesite-noreply at google.com
Tue Feb 17 15:09:49 PST 2009
Updates:
Cc: marecki
Comment #5 on issue 60 by cjlee112: (patch) windows platform needs a 'b'
flag to indicate binary formats
http://code.google.com/p/pygr/issues/detail?id=60
I discussed this with Marek and we decided on the following implementation:
for Python code, use mode 'rb' for binary files, 'rU' for text files. The
U flag is
specific to Python (introduced in Python 2.3) and provides "universal
newline"
support; i.e. on any platform, it will read all platforms' newline versions
(\n or \r
or \r\n) as '\n'. This ought to make our text file reading accept text
files from
other platforms transparently.
For C code, use mode 'rb' for binary files, 'r' for text files. According
to the
fopen() man pages, there is no standard flag for text file mode; that is
simply the
default behavior.
I will start implementing this for cnestedlist NLMSA, which is the main
usage that
comes to mind of binary file mode.
--
You received this message because you are listed in the owner
or CC fields of this issue, or because you starred this issue.
You may adjust your issue notification preferences at:
http://code.google.com/hosting/settings
More information about the pygr-notify
mailing list