(self, text)
return matches
Compute matches when text contains a dot.

		Assuming the text is of the form NAME.NAME....[NAME], and is
		evaluatable in self.namespace, it will be evaluated and its attributes
		(as revealed by dir()) are used as possible completions.  (For class
		instances, class members are also considered.)

		WARNING: this can still invoke arbitrary C code, if an object
		with a __getattr__ hook is evaluated.
Compute matches when text contains a dot.
Compute matches when text contains a dot .
def attr_matches(self, text):
		"""Compute matches when text contains a dot.

		Assuming the text is of the form NAME.NAME....[NAME], and is
		evaluatable in self.namespace, it will be evaluated and its attributes
		(as revealed by dir()) are used as possible completions.  (For class
		instances, class members are also considered.)

		WARNING: this can still invoke arbitrary C code, if an object
		with a __getattr__ hook is evaluated.
		"""
		import re
		bsw="[a-zA-Z0-9_\\(\\)\\[\\]\"']"
		m = re.match(r"(\w+(\.\w+)*)\.(\w*)".replace(r"\w",bsw), text)
		if not m:
			return []

		expr, attr = m.group(1, 3)
		try:
			try:
				thisobject = eval(expr, self.global_ns, self.local_ns)
			except NameError as e:
				"""
				print str(e)
				try:
					exec "import %s"%expr in global_ns, self.local_ns
					thisobject = eval(expr, global_ns, self.local_ns)
				except ImportError:
					pass
				"""
		except Exception as e:
			return []
		
		# get the content of the object, except __builtins__
		words = dir(thisobject)
		if "__builtins__" in words:
			words.remove("__builtins__")

		if hasattr(thisobject, '__class__'):
			words.append('__class__')
			words.extend(get_class_members(thisobject.__class__))
		words=[x for x in words if not x.startswith("__")]
		matches = []
		n = len(attr)
		for word in words:
			if word[:n] == attr and hasattr(thisobject, word):
				val = getattr(thisobject, word)
				word = self._callable_postfix(val, "%s.%s" % (expr, word))
				matches.append(word)
		return matches
def attr_matches ( self , text ) : import re bsw = "[a-zA-Z0-9_\\(\\)\\[\\]\"']" m = re . match ( r"(\w+(\.\w+)*)\.(\w*)" . replace ( r"\w" , bsw ) , text ) if not m : return [ ] expr , attr = m . group ( 1 , 3 ) try : try : thisobject = eval ( expr , self . global_ns , self . local_ns ) except NameError as e : """
				print str(e)
				try:
					exec "import %s"%expr in global_ns, self.local_ns
					thisobject = eval(expr, global_ns, self.local_ns)
				except ImportError:
					pass
				""" except Exception as e : return [ ] # get the content of the object, except __builtins__ words = dir ( thisobject ) if "__builtins__" in words : words . remove ( "__builtins__" ) if hasattr ( thisobject , '__class__' ) : words . append ( '__class__' ) words . extend ( get_class_members ( thisobject . __class__ ) ) words = [ x for x in words if not x . startswith ( "__" ) ] matches = [ ] n = len ( attr ) for word in words : if word [ : n ] == attr and hasattr ( thisobject , word ) : val = getattr ( thisobject , word ) word = self . _callable_postfix ( val , "%s.%s" % ( expr , word ) ) matches . append ( word ) return matches