-
As Python3 replaces the print statement by a print() function, the previous code was not compatible with Python3. We thus replaced all print statements by calls to sys.stdout.write() so that the code works both for Python2 and Python3.
As Python3 replaces the print statement by a print() function, the previous code was not compatible with Python3. We thus replaced all print statements by calls to sys.stdout.write() so that the code works both for Python2 and Python3.