Closed karthikp-ubc closed 10 years ago
There are other issues with Python 2 vs. Python 3. One other case that came up is for subprocess communication. The member function .communicate sends out byte code which needs to be decoded to string before being used. Example: p = subprocess.Popen(execlist, stdout = subprocess.PIPE) outputFile.write(p.communicate()[0]) works on Python 2.x but in Python 3.x needs conversion. The following works. p = subprocess.Popen(execlist, stdout = subprocess.PIPE) outputFile.write(p.communicate()[0].decode(encoding='UTF-8'))
regards, Steve
Closing this issue as this was just updated by Justin. Please reopen if it does not fix the problem. Thanks,
Python 3 no longer supports the print statement, yet this is what the Python scripts use.
We need to upgrade them to use the new print() function instead. See below for an example:
http://docs.python.org/3.0/whatsnew/3.0.html