python 3 fixes
minor refactoring of tcp interrupts