Changeset 2547


Ignore:
Timestamp:
Nov 23, 2016 10:15:47 AM (5 years ago)
Author:
vondreele
Message:

remove str() from some text handling - failed on non ascii characters in file name & user entered titles.
Some code cleanups

Location:
trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/GSASII.py

    r2544 r2547  
    2121import copy
    2222import random as ran
    23 import time
    2423import glob
    2524import imp
     
    7978import GSASIIpwd as G2pwd
    8079import GSASIIpwdGUI as G2pdG
    81 import GSASIIphsGUI as G2phsG
    82 import GSASIIimgGUI as G2imG
    8380import GSASIIspc as G2spc
    8481import GSASIIstrMain as G2stMn
     
    15321529                    dlg.Destroy()
    15331530            HistName = G2obj.MakeUniqueLabel(HistName,PWDRlist)
    1534             print('Read powder data '+str(HistName)+
    1535                 ' from file '+str(rd.readfilename) +
     1531            print('Read powder data '+HistName+
     1532                ' from file '+rd.readfilename +
    15361533                ' (format: '+ rd.formatName +
    1537                 '). Inst parameters from '+str(rd.instmsg))
     1534                '). Inst parameters from '+rd.instmsg)
    15381535            # data are read, now store them in the tree
    15391536            Id = self.PatternTree.AppendItem(parent=self.root,text=HistName)
     
    24612458            pltNum = self.G2plotNB.nb.GetSelection()
    24622459            if pltNum >= 0:                         #to avoid the startup with no plot!
    2463                 pltPage = self.G2plotNB.nb.GetPage(pltNum)
     2460                self.G2plotNB.nb.GetPage(pltNum)
    24642461            item = event.GetItem()
    24652462            G2gd.MovePatternTreeToGrid(self,item)
  • trunk/GSASIIplot.py

    r2546 r2547  
    1313########### SVN repository information ###################
    1414import math
    15 import time
    1615import sys
    1716import os.path
  • trunk/imports/G2pwd_BrukerRAW.py

    r2516 r2547  
    1818import os.path as ospath
    1919import struct as st
    20 import array as ar
    2120import numpy as np
    2221import GSASIIIO as G2IO
     
    138137                        nSteps = int(st.unpack('<i',File.read(4))[0])
    139138                        if iBlock+1 == blockNum:
    140                             t = st.unpack('<d',File.read(8))[0]
     139                            st.unpack('<d',File.read(8))[0]
    141140                            start2Th = st.unpack('<d',File.read(8))[0]
    142141                            File.seek(pos+176)
     
    183182                self.idstring = ospath.basename(filename) + ' Scan '+str(1)
    184183                nSteps = int(st.unpack('<i',File.read(4))[0])
    185                 t = st.unpack('<d',File.read(8))[0]
     184                st.unpack('<d',File.read(8))[0]
    186185                start2Th = st.unpack('<d',File.read(8))[0]
    187186                File.seek(pos+176)
Note: See TracChangeset for help on using the changeset viewer.