On 8/13/2010 12:59 PM, Tony wrote:
> My script right now basically just reads from a csv file and puts it
> into a dictionary for me.  However, when I make my own csv file (just
> the same as any I have seen), it acts inconsistently.  For example,
> sometimes it starts at the second line and another time it kept
> starting at the end of the file.  This isnt after multiple reads in
> one script either, just the first read from it.  my question is, has
> anyone seen this before and if so how is it corrected?  Also, is there
> anyway to tell the script to start from the beginning of the file?
> 
Start by believing that there is a reason for the behavior :)

Unless you provide fieldnames as a parameter the csv module gobbles the
first line of the file as field names, which might have something to do
with your confusion.

How do you draw your conclusion it was starting at the end of the file -
did you see no data at all?

regards
 Steve
-- 
DjangoCon US 2010 September 7-9 http://djangocon.us/

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.

Reply via email to