QR Code: in Python

pyqrcode
Project site at: http://pyqrcode.sourceforge.net/
Download source code: http://downloads.sourceforge.net/pyqrcode/pyqrcode-0.2.1.tar.gz?use_mirror=
Install from sourcecode on Ubuntu 10.04

$ sudo apt-get install jcc sun-openjdk-6-jdk python-imaging python-setuptools python-dev
 

For Python 2.6
replace "-m jcc" with "-m jcc.__main__" in Makefile
make
sudo make install
 
code example

#!/usr/bin/env python
# coding: utf-8
#
# pyqrcode sample encoder
 
import sys, qrcode
 
e = qrcode.Encoder()
image = e.encode('woah!', version=15, mode=e.mode.BINARY, eclevel=e.eclevel.H)
image.save('out.png')
 

There is a error like this.
Traceback (most recent call last):
  File "sample1.py", line 6, in <module>
    import sys, qrcode
  File "/usr/local/lib/python2.6/dist-packages/qrcode-0.2.1-py2.6-linux-i686.egg/qrcode/__init__.py", line 21, in <module>
    _qrcode._setExceptionTypes(JavaError, InvalidArgsError)
AttributeError: 'module' object has no attribute '_setExceptionTypes'