Skip to content

Instantly share code, notes, and snippets.

@wegrata
Last active August 29, 2015 14:13
Show Gist options
  • Save wegrata/88c054e64e72b020626c to your computer and use it in GitHub Desktop.
Save wegrata/88c054e64e72b020626c to your computer and use it in GitHub Desktop.
from os import walk
from os.path import join
from sys import argv
from pprint import pprint
def collect_paths(path):
file_paths = []
for root, dirs, files in walk(path, topdown=False):
for f in files:
file_paths.append(join(root, f))
return set(file_paths)
path_one = collect_paths(argv[1])
path_two = collect_paths(argv[2])
pprint(path_one.difference(path_two))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment