def grabTill(self, nps):
        """ Withdraws given number of NPs from the shop till, returns result
           
        Parameters:
           nps (int) -- Number of NPs to withdraw
           
        Returns
           bool - True if successful, False otherwise
        """
        if not int(nps):
            return False
            
        pg = self.usr.getPage("http://www.neopets.com/market.phtml?type=till")
        form = pg.form(action="process_market.phtml")
        
        form['amount'] = str(nps)
        form.usePin = True
        pg = form.submit()
        
        # If successful redirects to till page
        if "You currently have" in pg.content:
            return True
        else:
            logging.getLogger("neolib.shop").exception("Could not grab shop till.", {'pg': pg})
            return False
def grabTill ( self , nps ) : if not int ( nps ) : return False pg = self . usr . getPage ( "http://www.neopets.com/market.phtml?type=till" ) form = pg . form ( action = "process_market.phtml" ) form [ 'amount' ] = str ( nps ) form . usePin = True pg = form . submit ( ) if "You currently have" in pg . content : return True else : logging . getLogger ( "neolib.shop" ) . exception ( "Could not grab shop till." , { 'pg' : pg } ) return False
Withdraws given number of NPs from the shop till, returns result
           
        Parameters:
           nps (int) -- Number of NPs to withdraw
           
        Returns
           bool - True if successful, False otherwise