started python implemntation of generic protocol handler