Updated to use sys.stdout.write() to avoid newline. Probably a better way to do this but #yolo