old_contents: import string
  import random
  import argparse
  
  
  def passgen(length=12):
      """Generate a strong password with *length* characters"""
      pool = string.ascii_uppercase + string.ascii_lowercase + string.digits
  
      # Using technique from Stack Overflow answer
      # http://stackoverflow.com/a/23728630
      chars = [random.SystemRandom().choice(pool) for _ in range(length)]
      return "".join(chars)
  
  
  def main():
      parser = argparse.ArgumentParser(
          description="Generate strong random password."
      )
      parser.add_argument("-l", "--length",
                          help="the number of characters to generate "
                               "for each password",
                          type=int, default=12)
      parser.add_argument("-n", "--number",
                          help="how many passwords to generate",
                          type=int, default=10)
      args = parser.parse_args()
  
      for _ in range(args.number):
          print passgen(args.length)
  
new_contents: import string
  import random
  import argparse
  
  
  def passgen(length=12, punctuation=False):
      """Generate a strong password with *length* characters"""
      pool = string.ascii_uppercase + string.ascii_lowercase + string.digits
      if punctuation:
          pool = pool + string.punctuation
  
      # Using technique from Stack Overflow answer
      # http://stackoverflow.com/a/23728630
      chars = [random.SystemRandom().choice(pool) for _ in range(length)]
      return "".join(chars)
  
  
  def main():
      parser = argparse.ArgumentParser(
          description="Generate strong random password."
      )
      parser.add_argument("-l", "--length",
                          help="the number of characters to generate "
                               "for each password",
                          type=int, default=12)
      parser.add_argument("-n", "--number",
                          help="how many passwords to generate",
                          type=int, default=10)
      parser.add_argument("-p", "--punctuation",
                          help="use punctuation characters",
                          action='store_true')
      args = parser.parse_args()
  
      for _ in range(args.number):
          print passgen(args.length, punctuation=args.punctuation)
  
subject: Add --punctuation argument