Ignore:
Timestamp:
May 4, 2017 9:14:19 AM (5 years ago)
Author:
vondreele
Message:

fix printing of nonascii characters (e.g. "umlaut-o") in file names, etc. in exporters

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/exports/G2export_PDB.py

    r1299 r2819  
    134134            General = phasedict['General']
    135135            if General['Type'] != 'macromolecular':
    136                 print 'phase '+str(phasenam)+' not macromolecular, skipping'
     136                print 'phase '+phasenam+' not macromolecular, skipping'
    137137                continue
    138138            i = self.Phases[phasenam]['pId']
     
    197197            self.Write('END')
    198198            self.CloseFile()
    199             print('Phase '+str(phasenam)+' written to PDB file '+str(self.fullpath))
     199            print('Phase '+phasenam+' written to PDB file '+self.fullpath)
    200200
    201201class ExportPhaseCartXYZ(G2IO.ExportBaseclass):
     
    232232            Atoms = phasedict['Atoms']
    233233            if not len(Atoms):
    234                 print('**** ERROR - Phase '+str(phasenam)+' has no atoms! ****')
     234                print('**** ERROR - Phase '+phasenam+' has no atoms! ****')
    235235                continue
    236236            if len(self.phasenam) > 1: # if more than one filename is included, add a phase #
     
    247247                self.Write(fmt.format(atom[ct],*xyz))
    248248            self.CloseFile()
    249             print('Phase '+str(phasenam)+' written to XYZ file '+str(self.fullpath))
     249            print('Phase '+phasenam+' written to XYZ file '+self.fullpath)
    250250   
Note: See TracChangeset for help on using the changeset viewer.