Ignore:
Timestamp:
Jun 23, 2016 9:25:06 PM (6 years ago)
Author:
toby
Message:

improve powder imports: suppress printing of binary data; improve validation of old GSAS binary files

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/imports/G2pwd_FP.py

    r2161 r2341  
    6060            except ValueError:
    6161                self.errors = 'Unexpected information in line: '+str(i+1)
    62                 self.errors += '  '+str(S)
     62                if all([ord(c) < 128 and ord(c) != 0 for c in str(S)]): # show only if ASCII
     63                    self.errors += '  '+str(S)
     64                else:
     65                    self.errors += '  (binary)'
    6366                return False
    6467        return True # no errors encountered
Note: See TracChangeset for help on using the changeset viewer.