En Tue, 12 Feb 2008 08:37:13 -0200, Mike P <[EMAIL PROTECTED]> escribi�:
> just saw i needed to change record.startswith to row.startswith > but i get hte following traceback error > > Traceback (most recent call last): > File "C:\Python25\Lib\site-packages\pythonwin\pywin\framework > \scriptutils.py", line 310, in RunScript > exec codeObject in __main__.__dict__ > File "Y:\technical\Research\E2C\Template_CSV\import CSV test.py", > line 10, in <module> > if not start_line and row.startswith('Transaction ID'): > AttributeError: 'list' object has no attribute 'startswith' The csv reader doesn't return complete lines, but a list of fields for each line. If you want to check the first field, use: if not start_line and row[0].startswith('Transaction ID'): -- Gabriel Genellina -- http://mail.python.org/mailman/listinfo/python-list