CSV Reader

Reedick, Andrew jr9445 at ATT.COM
Tue Feb 12 15:51:49 CET 2008


> -----Original Message-----
> From: python-list-bounces+jr9445=att.com at python.org [mailto:python-
> list-bounces+jr9445=att.com at python.org] On Behalf Of Mike P
> Sent: Tuesday, February 12, 2008 5:37 AM
> To: python-list at python.org
> Subject: Re: CSV Reader
> 
> 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'
> --
> http://mail.python.org/mailman/listinfo/python-list


Algorithms + Data Structures = Programs

You need to understand what kind of data structure a "list" is.  You're
foundering a bit because you don't have a good understanding of your
tools (the list data structure in this case.)  Try going through the
O'Reilly Learning Python book.  Even better would be to take/audit a
college/university class on data structures and algorithms.  



*****

The information transmitted is intended only for the person or entity to which it is addressed and may contain confidential, proprietary, and/or privileged material. Any review, retransmission, dissemination or other use of, or taking of any action in reliance upon this information by persons or entities other than the intended recipient is prohibited. If you received this in error, please contact the sender and delete the material from all computers. GA623





More information about the Python-list mailing list