Reading button information using Python