Idea #11770
Updated by Tom Morris over 7 years ago
Implementation should match that of the Python file open method as described at: https://docs.python.org/2/library/functions.html#open includiing support for the @newlines@ field. ??In addition to the standard fopen() values mode may be 'U' or 'rU'. Python is usually built Traceback (most recent call last): File "sample_ids.py", line 42, in <module> with universal newlines support; supplying 'U' opens the file cr.open(fn, 'rU') as a text file, but lines may be terminated by any of the following: the Unix end-of-line convention '\n', the Macintosh convention '\r', or the Windows convention '\r\n'. All of these external representations are seen as '\n' by the Python program. If Python is built without universal newlines support a csvfile: File "/Users/tfmorris/anaconda/envs/arvados/lib/python2.7/site-packages/arvados/collection.py", line 644, in open raise errors.ArgumentError("Invalid mode with 'U' is the same as normal text mode. Note that file objects so opened also have an attribute called newlines which has a value of None (if no newlines have yet been seen), '\n', '\r', '\r\n', or a tuple containing all the newline types seen.?? {!r}".format(mode)) arvados.errors.ArgumentError: Invalid mode 'rU'