On 18/11/19 9:30 am, Dave Cinege wrote:
The few times I looked at CSV module it never looked useful to me. I
seem to use shlex for everything. For example:
def csv_split (s):
lex = shlex.shlex(s, posix=True)
lex.whitespace_split = True
lex.whitespace = ','
return list(lex)
The few times I looked at CSV module it never looked useful to me. I
seem to use shlex for everything. For example:
def csv_split (s):
lex = shlex.shlex(s, posix=True)
lex.whitespace_split = True
lex.whitespace = ','
return list(lex)
will split on commas while ho
On Sun, Nov 17, 2019 at 7:23 AM Antoon Pardon
wrote:
>
> This is python 2.6->2.7 and 3.5->3.7
>
> I need to convert a string that is a csv line to a list and vice versa.
> I thought to find functions doing this in the csv module but that doesn't
> seem to be the case.
Take a look at the test case
On 11/17/19 7:18 AM, Antoon Pardon wrote:
This is python 2.6->2.7 and 3.5->3.7
I need to convert a string that is a csv line to a list and vice versa.
I thought to find functions doing this in the csv module but that doesn't
seem to be the case.
I can of course write special classes that would
This is python 2.6->2.7 and 3.5->3.7
I need to convert a string that is a csv line to a list and vice versa.
I thought to find functions doing this in the csv module but that doesn't
seem to be the case.
I can of course write special classes that would allow for this using
a csv.reader and csv.wr