4 from popen2 import popen2
7 for i in xrange(len(list) - 1):
8 for o in xrange(i + 1, len(list)):
12 sys.stderr.write("usage: icom-dir DIRECTORY\n")
15 files = os.listdir(sys.argv[1])
19 for file1, file2 in combine(files):
20 co, ci = popen2(["icom", pj(sys.argv[1], file1), pj(sys.argv[1], file2)])
22 index = int(co.readline().split()[0])
24 sys.stdout.write("%i %s %s\n" % (index, file1, file2))