Changeset 3674


Ignore:
Timestamp:
Oct 15, 2018 11:45:38 AM (3 years ago)
Author:
toby
Message:

misc cosmetic & build changes

Location:
trunk
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/GSASII.py

    r3420 r3674  
    1818'''
    1919
     20import platform
    2021import GSASIIpath
    2122
     
    2829        print('Unable to run with current setup, do you want to update to the')
    2930        try:
    30             ans = raw_input("latest GSAS-II version? Update ([Yes]/no): ")
     31            if '2' in platform.python_version_tuple()[0]:           
     32                ans = raw_input("latest GSAS-II version? Update ([Yes]/no): ")
     33            else:
     34                ans = input("latest GSAS-II version? Update ([Yes]/no): ")               
    3135        except:
    3236            ans = 'no'
  • trunk/GSASIIdataGUI.py

    r3668 r3674  
    685685        else:
    686686            mode = wx.FD_OPEN
    687         filelist = G2G.GetImportFile(self,message="Choose "+label+" input file",
     687        if len(readerlist) > 1:
     688            typ = ' (type to be guessed)'
     689        else:
     690            typ = '( type '+readerlist[0].formatName+')'
     691        filelist = G2G.GetImportFile(self,
     692                    message="Choose "+label+" input file"+typ,
    688693                    defaultFile="",wildcard=choices,style=mode)
    689694        rd_list = []
  • trunk/GSASIIobj.py

    r3599 r3674  
    27772777        {'Limits':[1.,5.],'Background':[2,[0.,-0.2*np.pi],False],'Peaks':[]})
    27782778    return Id
    2779 
     2779#%%
    27802780class ShowTiming(object):
    27812781    '''An object to use for timing repeated sections of code.
     
    27982798       
    27992799    '''
    2800     import time
    28012800    def __init__(self):
    28022801        self.timeSum =  []
     
    28052804        self.prev = None
    28062805    def start(self,label):
     2806        import time
    28072807        if label in self.label:
    28082808            i = self.label.index(label)
     
    28172817        self.prev = i
    28182818    def end(self):
     2819        import time
    28192820        if self.prev is not None:
    28202821            self.timeSum[self.prev] += time.time() - self.timeStart[self.prev]
     
    28252826        for i,(lbl,val) in enumerate(zip(self.label,self.timeSum)):
    28262827            print('{} {:20} {:8.2f} ms {:5.2f}%'.format(i,lbl,1000.*val,100*val/sumT))
    2827 
     2828#%%
    28282829
    28292830if __name__ == "__main__":
  • trunk/fsource/SConstruct

    r3504 r3674  
    283283#==========================================================================================
    284284# Setup build Environment
    285 env = Environment()
     285if sys.platform == "win32":
     286   env = Environment(ENV = os.environ)
     287else:
     288   env = Environment()
    286289# Define a builder to run f2py
    287290def generate_f2py(source, target, env, for_signature):
Note: See TracChangeset for help on using the changeset viewer.