yes Alan, what you said is true. Thank you.
On Tue, Apr 15, 2014 at 1:40 PM, Alan Gauld <alan.ga...@btinternet.com>wrote: > On 15/04/14 07:06, Sunil Tech wrote: > >> Hi, >> >> #!/usr/bin/python >> >> import csv >> import sys >> >> def main(): >> cr = csv.reader(open("data.csv","rb")) >> for row in cr: >> print row >> > > when i run this... >> >> >> cr = csv.reader(open("data.csv","rb")) >> AttributeError: 'module' object has no attribute 'reader' >> >> > The most common cause of this error is that you have > created a file called csv.py which is masking the > library module. > > Could that be the case here? > > > -- > Alan G > Author of the Learn to Program web site > http://www.alan-g.me.uk/ > http://www.flickr.com/photos/alangauldphotos > > _______________________________________________ > Tutor maillist - Tutor@python.org > To unsubscribe or change subscription options: > https://mail.python.org/mailman/listinfo/tutor >
_______________________________________________ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: https://mail.python.org/mailman/listinfo/tutor