Remove unnecessary use of sys.stdout.