I lied. Basic Registry writing code added.

As well as Python 2 code reference (so I don't forget)