#!/usr/bin/env python3 import time import argparse defsecs = 3 parser = argparse.ArgumentParser() parser.add_argument("-t", "--thread") parser.add_argument("-s", "--seconds", type=int) args = parser.parse_args() if not args.seconds: args.seconds = defsecs time.sleep(args.seconds) print("Process %s output (%s)" % (args.thread, time.strftime("%H:%M:%S")))