This snippet does not work on Centos 6.4 with Python 2.6