backport gtpclient to python 2.6