Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/usr/bin/python3
- import sys, re
- pattern = re.compile(r'^\-.*$')
- installed = sys.argv[2].split('\n')
- 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)]
- print('\n'.join(explicitly))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement