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 - [email protected]
To unsubscribe or change subscription options:
https://mail.python.org/mailman/listinfo/tutor