def expand_args(args, flist):
 expanded = args[:]
 if flist:
  try:
   if (flist == '-'):
    fd = sys.stdin
   else:
    fd = open(flist)
   while 1:
    line = fd.readline()
    if (not line):
     break
    expanded.append(line[:(-1)])
  except IOError:
   print ('Error reading file list %s' % flist)
   raise
 return expanded

def expand_args ( args , flist ) : expanded = args [ : ] if flist : try : if ( flist == '-' ) : fd = sys . stdin else : fd = open ( flist ) while 1 : line = fd . readline ( ) if ( not line ) : break expanded . append ( line [ : ( - 1 ) ] ) except IOError : print ( 'Error reading file list %s' % flist ) raise return expanded
read names in flist and append to args .