Another trivial example

#!/usr/bin/env python
"""
"""
import argparse, sys, os

def main(): 

    parser = argparse.ArgumentParser( 
        formatter_class = argparse.RawDescriptionHelpFormatter,
        usage='%(prog)s [options]', 
        description= "Install hasyutils debian package on some host")
    
    parser.add_argument( '--p2', dest="p2", action="store_true", help='select python2 package')
    parser.add_argument( '--p3', dest="p3", action="store_true", help='select python3 package')
    parser.add_argument( 'hostName', nargs=1, default='None', help='hostname where the package is to be installed')  
    args = parser.parse_args()

    if not args.p2 and not args.p3:
        print( "DoDebianInstall.py: select --p2 xor --p3")
        return 
    if args.p2 and args.p3:
        print( "DoDebianInstall.py: select --p2 xor --p3")
        return 
        
    if args.hostName == "None": 
        print( "DoDebianInstall.py: specify hostname")
        sys.exit( 255)
    ...

if __name__ == "__main__":
    main()