Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/usr/bin/env python2
- """Demonstrate a bug in unicodecsv with non-ASCII headers
- In version 0.11.0 this works fine.
- In version 0.11.1 it throws an error when writing the header."""
- import unicodecsv
- print "Unicode CSV version %s" % (unicodecsv.__version__)
- fp = file("out.csv", "wb")
- headers = (u'unicode\u2603',)
- writer = unicodecsv.DictWriter(fp, headers)
- writer.writeheader()
- print "File wrote correctly!"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement