Make python scripts python3 compatible

A simple patch that makes python scripts in Nemo python3 compatible.