Re: CSV Issue

2007-07-26 Thread Rohan
On Jul 26, 2:32 pm, John Machin <[EMAIL PROTECTED]> wrote: > On Jul 27, 7:19 am, Rohan <[EMAIL PROTECTED]> wrote: > > > f = open("/home/t/tp/va/e7.csv", "ab") > > a means Append -- you are appending the data that you expect to the > EXISTING contents of the file. Hello John, Yea silly mistake, wri

Re: CSV Issue

2007-07-26 Thread John Machin
On Jul 27, 7:19 am, Rohan <[EMAIL PROTECTED]> wrote: > f = open("/home/t/tp/va/e7.csv", "ab") a means Append -- you are appending the data that you expect to the EXISTING contents of the file. -- http://mail.python.org/mailman/listinfo/python-list

CSV Issue

2007-07-26 Thread Rohan
I'm having a trouble consider this import csv f = open("/home/t/tp/va/some7.csv", "rb") reader =csv.reader(f) rows =[] for row in reader: rows.append(row) rows[1].append('1') print rows f = open("/home/t/tp/va/e7.csv", "ab") writer =csv.writer(f) writer.writerows(rows) f.close() In the f