2.6 compatible connect.py