python3: Minor changes to make this work with Python3. Helps with #4 but I have another commit to correct the main issue for #4