code: def delegate(self, to, steempower):
          ''' Delegates based on Steem Power rather
          than by vests.
          '''
          self.global_props()
          vests = self.util.sp_to_vests(steempower)
          strvests = str(vests)
          strvests = strvests + " VESTS"
          try:
              self.steem_instance().commit.delegate_vesting_shares(to, 
                                                                  strvests, 
                                                                  account=self.mainaccount)
          except Exception as e:
              self.msg.error_message("COULD NOT DELEGATE " 
                                      + str(steempower) + " SP TO " 
                                      + to + ": " + str(e))
              return False
          else:
              self.msg.message("DELEGATED " + str(steempower) + " STEEM POWER TO " + str(to))
              return Truf delegate(self, to, steempower):
          ''' Delegates based on Steem Power rather
          than by vests.
          '''
          self.global_props()
          vests = self.util.sp_to_vests(steempower)
          strvests = str(vests)
          strvests = strvests + " VESTS"
          try:
              self.steem_instance().commit.delegate_vesting_shares(to, 
                                                                  strvests, 
                                                                  account=self.mainaccount)
          except Exception as e:
              self.msg.error_message("COULD NOT DELEGATE " 
                                      + str(steempower) + " SP TO " 
                                      + to + ": " + str(e))
              return False
          else:
              self.msg.message("DELEGATED " + str(steempower) + " STEEM POWER TO " + str(to))
              return True
docs: Delegates based on Steem Power rather
          than by vests.