Modified python scripts to work in Ubuntu