All pastes #625430 Raw Edit

Mine

public text v1 · immutable
·published 2007-07-18 22:49 UTC
rendered paste body
#!/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