Python - writing reading registers work