Prepare for python3 fix

otherwise cv script doesn't run on latest version

this pull request is intended to be a refresh of giulio's repo