Hi Susana, On 5 September 2011 17:08, Susana Iraiis Delgado Rodriguez < susana.delgad...@utzmg.edu.mx> wrote:
> File "win.py", line 43, in boton4 > writer = csv.writer(open(csv_name, 'w')) > AttributeError: 'function' object has no attribute 'writer' > I read a tutorial and csv has a writer function, I'm lost > > Yes, the csv module has a writer function. But read carefully! The error message isn't saying that the csv module doesn't have a writer function -- it says **function object** has no attribute 'writer'. So... somehow Python thinks that the name 'csv' refers to a function at the point in the code where the error is thrown. So how can this be? You should be asking yourself this question -- could it be that you've (for example) defined a *function* called 'csv', thereby effectively effectively hiding the *module* csv? ;) Walter
_______________________________________________ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor