Starting a rewrite in Python