import tokenize
import types
-try:
- True
-except NameError:
- True = 1==1
- False = 1==0
-
def getAutoCompleteList(command='', locals=None, includeMagic=1,
includeSingle=1, includeDouble=1):
"""Return list of auto-completion options for command.
for item in attributes:
dict[item] = None
attributes = dict.keys()
+ # new-style swig wrappings can result in non-string attributes
+ # e.g. ITK http://www.itk.org/
+ attributes = [attribute for attribute in attributes \
+ if type(attribute) == str]
attributes.sort(lambda x, y: cmp(x.upper(), y.upper()))
if not includeSingle:
attributes = filter(lambda item: item[0]!='_' \