Add option to print version and exit

This commit is contained in:
Vineet Naik 2016-12-28 20:26:39 +05:30
parent 8eb74e6bd9
commit 6da750ad61
1 changed files with 2 additions and 0 deletions

View File

@ -429,6 +429,8 @@ def main():
parser = argparse.ArgumentParser(description=(
'Dependency tree of the installed python packages'
))
parser.add_argument('-v', '--version', action='version',
version='{0}'.format(__version__))
parser.add_argument('-f', '--freeze', action='store_true',
help='Print names so as to write freeze files')
parser.add_argument('-a', '--all', action='store_true',