I guess i'd do it this way, but there probably is a better way.
http://pastie.org/2028065
Edit: Oh and obviously this enforces "foo -bar=bar1 -baz=baz1" format.
Edit #2: You could also play with something like
def simplearg(input,key):
z = input[input.index(key):]
a = z.find(' ')
return z[0:a].split('=')[1]
that is less strict on the command format