Welcome, guest | Sign In | My Account | Store | Cart

Notice! PyPM is being replaced with the ActiveState Platform, which enhances PyPM’s build and deploy capabilities. Create your free Platform account to download ActivePython or customize Python with the packages you require and get automatic updates.

Download
ActivePython
INSTALL>
pypm install unicodecsv

How to install unicodecsv

  1. Download and install ActivePython
  2. Open Command Prompt
  3. Type pypm install unicodecsv
 Python 2.7Python 3.2Python 3.3
Windows (32-bit)
0.9.0
0.9.4Never BuiltWhy not?
0.9.0 Available View build log
Windows (64-bit)
0.9.0
0.9.4Never BuiltWhy not?
0.9.0 Available View build log
Mac OS X (10.5+)
0.9.0
0.9.4Never BuiltWhy not?
0.9.0 Available View build log
Linux (32-bit)
0.9.0
0.9.4Never BuiltWhy not?
0.9.0 Available View build log
Linux (64-bit)
0.9.4 Available View build log
0.9.0 Available View build log
0.9.4 Failed View build log
0.9.0 Failed View build log
 
Author
License
BSD License
Imports
Lastest release
version 0.9.4 on Sep 20th, 2013

The unicodecsv is a drop-in replacement for Python 2's csv module which supports unicode strings without a hassle.

More fully

Python 2's csv module doesn't easily deal with unicode strings, leading to the dreaded "'ascii' codec can't encode characters in position ..." exception.

You can work around it by encoding everything just before calling write (or just after read), but why not add support to the serializer?

>>> import unicodecsv
>>> from cStringIO import StringIO
>>> f = StringIO()
>>> w = unicodecsv.writer(f, encoding='utf-8')
>>> w.writerow((u'é', u'ñ'))
>>> f.seek(0)
>>> r = unicodecsv.reader(f, encoding='utf-8')
>>> row = r.next()
>>> print row[0], row[1]
é ñ

Subscribe to package updates

Last updated Sep 20th, 2013

Download Stats

Last month:11

What does the lock icon mean?

Builds marked with a lock icon are only available via PyPM to users with a current ActivePython Business Edition subscription.

Need custom builds or support?

ActivePython Enterprise Edition guarantees priority access to technical support, indemnification, expert consulting and quality-assured language builds.

Plan on re-distributing ActivePython?

Get re-distribution rights and eliminate legal risks with ActivePython OEM Edition.