init: support py2.6 and 3