code: def dir(self,methods=True,showall=True):
  		import inspect
  		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
  		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)
  			doc = attr.__doc__
  			if not doc:
  				doc=""
  			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