Mercurial > python-cmd2
comparison cmd2.py @ 383:2594f69698b2
trying to fix binds
author | catherine@dellzilla |
---|---|
date | Tue, 02 Mar 2010 19:12:08 -0500 |
parents | 2687482dfa33 |
children | be4194f41916 e4bc5174aad1 |
comparison
equal
deleted
inserted
replaced
382:2687482dfa33 | 383:2594f69698b2 |
---|---|
975 Sets a cmd2 parameter. Accepts abbreviated parameter names so long | 975 Sets a cmd2 parameter. Accepts abbreviated parameter names so long |
976 as there is no ambiguity. Call without arguments for a list of | 976 as there is no ambiguity. Call without arguments for a list of |
977 settable parameters with their values.''' | 977 settable parameters with their values.''' |
978 try: | 978 try: |
979 statement, paramName, val = arg.parsed.raw.split(None, 2) | 979 statement, paramName, val = arg.parsed.raw.split(None, 2) |
980 val = val.strip() | |
980 paramName = paramName.strip().lower() | 981 paramName = paramName.strip().lower() |
981 if paramName not in self.settable: | 982 if paramName not in self.settable: |
982 hits = [p for p in self.settable if p.startswith(paramName)] | 983 hits = [p for p in self.settable if p.startswith(paramName)] |
983 if len(hits) == 1: | 984 if len(hits) == 1: |
984 paramName = hits[0] | 985 paramName = hits[0] |