Please ignore previous email. this error occurred as i had previously created .pyc file... after deleting that .pyc file.. now it is working fine.
Thank you. On Tue, Apr 15, 2014 at 11:36 AM, Sunil Tech <sunil.tech...@gmail.com>wrote: > Hi, > > #!/usr/bin/python > > import csv > import sys > > def main(): > cr = csv.reader(open("data.csv","rb")) > for row in cr: > print row > > if __name__ == "__main__": > sys.exit(main()) > > > > when i run this... > > i get > > Traceback (most recent call last): > File "data.py", line 14, in <module> > sys.exit(main()) > File "data.py", line 9, in main > cr = csv.reader(open("data.csv","rb")) > AttributeError: 'module' object has no attribute 'reader' > > > can anyone correct me please. > > thank you in advance. > >
_______________________________________________ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: https://mail.python.org/mailman/listinfo/tutor