os.system('''/usr/bin/osascript -e 'tell app "Finder" to set frontmost of process "python" to true' ''')
filebyfile=1
expname='All'
#filenames = askopenfilenames() # show an "Open" dialog box and return the path to the selected file
filenames={'/Volumes/lben/lben-commun/2018 User Data/Michael/LockIn/modelcell_05-02-2018_14_40.txt','/Volumes/lben/lben-commun/2018 User Data/Michael/LockIn/2modelcells, resistor_05-02-2018_14_55.txt'}