I'm just learning Python and Django. **Could someone tell me where I'm going wrong with below?**
What I want to do is something like this csvobject = CSVViewer(file) rows = csvobject.get_row_count() This is what I have so far. Remember this is all new to me so I'm looking for a an explanation. Thanks. class CSVViewer: def __init__(self, file=None): self.file = file def read_file(self): data = [] file_read = csv.reader(self.file) for row in file_read: data.append(row) return data def get_row_count(self): return len(read_file(self)) Any experts or pointer or reading is welcome. Thanks again -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscr...@googlegroups.com. To post to this group, send email to django-users@googlegroups.com. Visit this group at http://groups.google.com/group/django-users?hl=en. For more options, visit https://groups.google.com/groups/opt_out.