comparison cmd2.py @ 33:11d44bf343c7

rejoin arg after split
author catherine.devlin@gmail.com
date Mon, 19 May 2008 13:43:07 -0400
parents dd64c0e3dbe0
children
comparison
equal deleted inserted replaced
31:dd64c0e3dbe0 33:11d44bf343c7
50 optparse.OptionError, optparse.AmbiguousOptionError, 50 optparse.OptionError, optparse.AmbiguousOptionError,
51 optparse.OptionConflictError), e: 51 optparse.OptionConflictError), e:
52 print e 52 print e
53 optionParser.print_help() 53 optionParser.print_help()
54 return 54 return
55 result = func(instance, arg, opts) 55 result = func(instance, ' '.join(arg), opts)
56 return result 56 return result
57 newFunc.__doc__ = '%s\n%s' % (func.__doc__, optionParser.format_help()) 57 newFunc.__doc__ = '%s\n%s' % (func.__doc__, optionParser.format_help())
58 return newFunc 58 return newFunc
59 return option_setup 59 return option_setup
60 60