Advertisement
Guest User

Untitled

a guest
Apr 24th, 2017
53
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.28 KB | None | 0 0
  1. #!/usr/bin/python3
  2. import sys, re
  3. pattern = re.compile(r'^\-.*$')
  4. installed = sys.argv[2].split('\n')
  5. explicitly = [val for sublist in [item.split()[2:] for item in sys.argv[1].split('\n')] for val in sublist if val in installed and not re.match(pattern, val)]
  6. print('\n'.join(explicitly))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement