Changeset 4195 for trunk/GSASIIfiles.py


Ignore:
Timestamp:
Dec 3, 2019 3:00:37 AM (23 months ago)
Author:
vondreele
Message:

add a find utility to GSASIIfiles for finding a file within a directory tree
faster version of ExpandCell? & define SwapItems? in GSASIIlattice
changes to RMCProfile interface

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/GSASIIfiles.py

    r4026 r4195  
    6868        G2Print('G2SetPrintLevel Error: level={} cannot be interpreted.',
    6969                    'Use all, warn, error or none.')
     70       
     71def find(name, path):
     72    '''find 1st occurance of file in path
     73    '''
     74    for root, dirs, files in os.walk(path):
     75        if name in files:
     76            return os.path.join(root, name)
    7077       
    7178def G2Print(*args,**kwargs):
Note: See TracChangeset for help on using the changeset viewer.