​What does something like this do for you?​

with open(csvfile, "r", encoding='utf-16') as csv:
>
>     self.rows = csv.readlines()
>
>     for
> ​i, ​
> line in
> ​enumerate(​
> self.rows
> ​)​
> :
>
>         cells = line.split(",")
>
>         if i >= start:
>
>             print(', '.join(cells)
> ​.encode('cp1252', 'replace').decode('cp1252')​
> )
>
>         if i > finish:
>
>             break
>
>
>
-- 
William Leslie

Notice:
Likely much of this email is, by the nature of copyright, covered under
copyright law.  You absolutely MAY reproduce any part of it in accordance
with the copyright law of the nation you are reading this in.  Any attempt
to DENY YOU THOSE RIGHTS would be illegal without prior contractual
agreement.
_______________________________________________
melbourne-pug mailing list
[email protected]
https://mail.python.org/mailman/listinfo/melbourne-pug

Reply via email to