T160 pythonioencoding export

I am confused about why these merges and earlier commits are in this branch.  Might need to start again.  Proceed with caution.