def osc_ostlist(directory, fs):
 ostlist = []
 for ost in os.listdir(directory):
  if (fs in ost):
   fir = ost.find('-')
   sec = ost.find('-', (fir + 1))
   thrd = ost.find('-', (sec + 1))
   ost_name = ost[(fir + 1):sec]
   if (ost_name not in ostlist):
    ostlist.append(ost_name)
    (yield ost_name)

def osc_ostlist ( directory , fs ) : ostlist = [ ] for ost in os . listdir ( directory ) : if ( fs in ost ) : fir = ost . find ( '-' ) sec = ost . find ( '-' , ( fir + 1 ) ) thrd = ost . find ( '-' , ( sec + 1 ) ) ost_name = ost [ ( fir + 1 ) : sec ] if ( ost_name not in ostlist ) : ostlist . append ( ost_name ) ( yield ost_name )
return ost names based on folder names in osc directory .