Switched from print() to stdout.write in management commands.