Author: bugman
Date: Thu Nov 20 16:39:20 2014
New Revision: 26670
URL: http://svn.gna.org/viewcvs/relax?rev=26670&view=rev
Log:
Python 3 bug fix for the lib.spectrum.nmrpipe.show_apod_extract() function.
The subprocess module output from the showApod program, or any software, is a
byte array in Python 3
rather than text. This is now detected and the byte array converted to text
before any processing.
Modified:
trunk/lib/spectrum/nmrpipe.py
Modified: trunk/lib/spectrum/nmrpipe.py
URL:
http://svn.gna.org/viewcvs/relax/trunk/lib/spectrum/nmrpipe.py?rev=26670&r1=26669&r2=26670&view=diff
==============================================================================
--- trunk/lib/spectrum/nmrpipe.py (original)
+++ trunk/lib/spectrum/nmrpipe.py Thu Nov 20 16:39:20 2014
@@ -226,6 +226,10 @@
# Wait for finish and get return code.
return_value = Temp.wait()
+ # Python 3 support - convert byte arrays to text.
+ if hasattr(output, 'decode'):
+ output = output.decode()
+
return output.splitlines()
_______________________________________________
relax (http://www.nmr-relax.com)
This is the relax-commits mailing list
[email protected]
To unsubscribe from this list, get a password
reminder, or change your subscription options,
visit the list information page at
https://mail.gna.org/listinfo/relax-commits