finally centralize this code in AutobahnPython