I am using csv.reader to read file but it giving me whole file.
file_data = self.request.get('file_in');
file_Reader = csv.reader( file_data );
for fields in file_Reader:
I want one line at a time and separate data from that line.
ex: filedata = name,sal,dept
x,12000,it
o\p=
name
sal
dept
.
.
.
It looks like you are trying to pass a string of data directly to csv.reader(). It’s expecting an iterable object like a list or filehandle. The docs for the csv module mention this. So you probably want to split the string along newlines before passing it to csv.reader.
Hope that helps.