Changeset 3260 for trunk/exports/G2export_CIF.py
- Timestamp:
- Feb 4, 2018 9:38:11 AM (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/exports/G2export_CIF.py
r3253 r3260 53 53 except ImportError: 54 54 pass 55 import GSASIIobj as G2obj 55 56 import GSASIImath as G2mth 56 57 import GSASIIspc as G2spc … … 324 325 WriteCIFitem(fp, '\nloop_ _atom_type_symbol _atom_type_number_in_cell') 325 326 formula = '' 326 for elem in HillSortElements( compDict.keys()):327 for elem in HillSortElements(list(compDict.keys())): 327 328 WriteCIFitem(fp, ' ' + PutInCol(elem,4) + 328 329 G2mth.ValEsd(compDict[elem],-0.009,True)) … … 441 442 CIFobj = G2dict.get("CIF_template") 442 443 if defaultname: 443 defaultname = defaultname.encode('ascii','replace').strip().replace(' ','_')444 defaultname = G2obj.StripUnicode(defaultname) 444 445 defaultname = re.sub(r'[^a-zA-Z0-9_-]','',defaultname) 445 446 defaultname = tmplate + "_" + defaultname + ".cif" … … 2945 2946 self.CIF = G2dict.get("CIF_template") 2946 2947 if defaultname: 2947 self.defaultname = defaultname.encode('ascii','replace').strip().replace(' ','_')2948 self.defaultname = G2obj.StripUnicode(defaultname) 2948 2949 self.defaultname = re.sub(r'[^a-zA-Z0-9_-]','',self.defaultname) 2949 2950 self.defaultname = tmplate + "_" + self.defaultname + ".cif"
Note: See TracChangeset
for help on using the changeset viewer.