fix python version check to work in python2 as well as python3, allowing url formed arguments