> What I am actually trying to do is look for command line > options in sys.argv. > > if '-o' in sys.argv or '--option' in sys.argv: > apply_option() Have you looked at the getopt module? It might be easier... Alan G.