added python2.6 compatibility to swarp script