#!/usr/bin/env python import os import re checkout_re = re.compile("^(svn co|svn checkout|cvs co|cvs checkout)") all_checkouts = os.listdir("/home/kfogel/src/") standard_checkouts = [] for line in open("/home/kfogel/bin/new-box-setup.sh").readlines(): if checkout_re.match(line): line = line.strip() last_part = line[line.rfind(' ') - len(line) + 1:] standard_checkouts.append(last_part) for checkout in all_checkouts: if checkout not in standard_checkouts: print checkout