Thanks Peter for you help and time. Everything is in this: > while True: > type_, args = decode(readEncodedData()) > cmd = commands[type_](args) > cmd.execute() I already changed the way I do this. Yannick