sedampatil 0 Newbie Poster

import csv

file = open('signin.csv',"rb")
reader = csv.reader(file)
rownum = 0
for row in reader:
if rownum == 0:
header = row
else:
colnum = 0
for col in row:
print '%-8s: %s' %s(header[colnum],col)
colnum += 1
rownum += 1
file.close()

Hi could any one help me out, i am trying to print the csv file data, but getting as error message as "new-line character seen in unquoted field - do you need to open the file in universal-newline mode?". Can u please correct my above posted code that will help me to go further programming.from last few days i am working with python for automation.My total exp is on perl, i don't know the posting rules here as in perlmonks.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.