Python csv.writer delimiter with \ ?

6221
10
07-21-2016 12:39 PM
DevinUnderwood2
Occasional Contributor

How do I use a back slash as a delimiter, python wont recognize it.

ofile  = open('MapServicesInfo.csv', "w")

writer = csv.writer(ofile, delimiter = '\', quotechar='"', quoting=csv.QUOTE_ALL)

Tags (2)
0 Kudos
10 Replies
DanPatterson_Retired
MVP Emeritus

there is something wrong with the example you gave me, since it shouldn't be splitting things out letter by letter.  it should just split on "\\"

You had better do a test on that to see if it works with your inputs

I would convert fullpath to a string first, then post that example since there is something amiss in my examples and your inputs.

0 Kudos