python 3 encoding

I've changed a few lines to run cv and other demo scripts with .py version 3