[Python-checkins] python/nondist/sandbox/csv csv.py,1.10,1.11

davecole@users.sourceforge.net davecole@users.sourceforge.net
Sun, 02 Feb 2003 03:57:31 -0800


Update of /cvsroot/python/python/nondist/sandbox/csv
In directory sc8-pr-cvs1:/tmp/cvs-serv12500

Modified Files:
	csv.py 
Log Message:
Implemented lineterminator in _csv.
* Removed append of '\n' in csv.writer.write()
* Fixed tests to look for records terminated by '\r\n'.


Index: csv.py
===================================================================
RCS file: /cvsroot/python/python/nondist/sandbox/csv/csv.py,v
retrieving revision 1.10
retrieving revision 1.11
diff -C2 -d -r1.10 -r1.11
*** csv.py	2 Feb 2003 10:53:59 -0000	1.10
--- csv.py	2 Feb 2003 11:57:28 -0000	1.11
***************
*** 9,17 ****
      escapechar = None
      skipinitialspace = False
! # XXX - andrewm - This is causing weird errors from the _csv module - needs
! # investigation:
! # XXX - davecole - I just noticed that I was saving a string arg 's'
! # instead of an object arg 'O'.  What do you see now?
! #   lineterminator = '\r\n'
      quoting = QUOTE_MINIMAL
  
--- 9,13 ----
      escapechar = None
      skipinitialspace = False
!     lineterminator = '\r\n'
      quoting = QUOTE_MINIMAL
  
***************
*** 75,79 ****
          except (TypeError, AttributeError):
              pass
!         self.fileobj.write(self.parser.join(fields) + '\n')
  
      def writelines(self, lines):
--- 71,75 ----
          except (TypeError, AttributeError):
              pass
!         self.fileobj.write(self.parser.join(fields))
  
      def writelines(self, lines):