def use_powerline_prompt(cls):
 @property
 def prompt(self):
  try:
   powerline = self.powerline
  except AttributeError:
   powerline = PDBPowerline()
   powerline.setup(self)
   self.powerline = powerline
  return PowerlineRenderResult(powerline.render(side=u'left'))
 @prompt.setter
 def prompt(self, _):
  pass
 @prompt.deleter
 def prompt(self):
  pass
 if (not hasattr(cls, u'__class__')):
  old_cls = cls
  class cls(cls, object, ):
   __module__ = cls.__module__
   __doc__ = cls.__doc__
  cls.__name__ = old_cls.__name__
 cls.prompt = prompt
 return cls

def use_powerline_prompt ( cls ) : @ property def prompt ( self ) : try : powerline = self . powerline except AttributeError : powerline = PDBPowerline ( ) powerline . setup ( self ) self . powerline = powerline return PowerlineRenderResult ( powerline . render ( side = u'left' ) ) @ prompt . setter def prompt ( self , _ ) : pass @ prompt . deleter def prompt ( self ) : pass if ( not hasattr ( cls , u'__class__' ) ) : old_cls = cls class cls ( cls , object , ) : __module__ = cls . __module__ __doc__ = cls . __doc__ cls . __name__ = old_cls . __name__ cls . prompt = prompt return cls
decorator that installs powerline prompt to the class .