def getIDsFromFiles(files):
if type(files) is str:<EOL><INDENT>files=glob.glob(files+"<STR_LIT>")<EOL><DEDENT>IDs=[]<EOL>for fname in files:<EOL><INDENT>if fname[-<NUM_LIT:4>:].lower()=='<STR_LIT>':<EOL><INDENT>ext=fname.split('<STR_LIT:.>')[-<NUM_LIT:1>]<EOL>IDs.append(os.path.basename(fname).replace('<STR_LIT:.>'+ext,'<STR_LIT>'))<EOL><DEDENT><DEDENT>return sorted(IDs)<EOL>
given a path or list of files, return ABF IDs.