code: def dir(self,methods=True,showall=True):
  		
  		import inspect
  		#print "[attributes]"
  		for k,v in sorted(self.__dict__.items()):
  			if k.startswith("_"): continue
  			print makeminlength("."+k,being.linelen),"\t",v
  
  		if not methods:
  			return
  
  		entmethods=dir(entity)
  
  		print
  		#print "[methods]"
  		for x in [x for x in dir(self) if ("bound method "+self.classname() in str(getattr(self,x))) and not x.startswith("_")]:
  			if (not showall) and (x in entmethods): continue
  
  			attr=getattr(self,x)
  
  			#print attr.__dict__
  			#print dir(attr)
  
  			#doc=inspect.getdoc(attr)
  			doc = attr.__doc__
  			if not doc:
  				doc=""
  			#else:
  			#	docsplit=[z for z in doc.replace("\r","\n").split("\n") if z]
  			#	if len(docsplit)>1:
  			#		doc = docsplit[0] + "\n" + makeminlength(" ",being.linelen) + "\n".join( makeminlength(" ",being.linelen)+"\t"+z for z in docsplit[1:])
  			#	else:
  			#		doc = docsplit[0]
  			y=describe_func(attr)
  			if not y:
  				y=""
  			else:
  				y=", ".join(a+"="+str(b) for (a,b) in y)
  			print makeminlength("."+x+"("+y+")",being.linelen),"\t", doc
  			if showall: print
docs: Show this object's attributes and methods.