#!/usr/bin/python import sys from getopt import * is_c=0 print_k=0 temp=sys.argv[-1] try: t=float(temp) except: print "%s is not a temperature." % temp sys.exit(1) olist,alist = getopt(sys.argv[1:-1], "cCfFkK") for opt,a in olist: if opt.lower()=='-c': is_c=1