Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(5)  |  Call(5)  |  Derive(0)  |  Import(0)
0=none, 1-13=2-Ah 14-26=2-Ad 27-39=2-Ac 40-52=2-As 

        def cardFromValueSuit(value, suit):
    """ 0=none, 1-13=2-Ah 14-26=2-Ad 27-39=2-Ac 40-52=2-As """
    if suit == 'h':  return(value-1)
    elif suit == 'd':  return(value+12)
    elif suit == 'c':  return(value+25)
    elif suit == 's':  return(value+38)
    else: return(0)
        


src/f/p/fpdb-chaz-HEAD/pyfpdb/GuiHandViewer.py   fpdb-chaz(Download)
        for j in range(0, 13):
            for i in range(0, 4):
                loc = Card.cardFromValueSuit(ranks[j], suits[i])
                card_image = self.deck_instance.card(suits[i], ranks[j])
                #must use copy(), method_instance not usable in global variable

src/f/p/fpdb-chaz-HEAD/pyfpdb/GuiReplayer.py   fpdb-chaz(Download)
        for j in range(0, 13):
            for i in range(0, 4):
                loc = Card.cardFromValueSuit(ranks[j], suits[i])
                card_im = self.deck_inst.card(suits[i], ranks[j])
                #must use copy(), method_instance not usable in global variable
            for j in range(0, 13):
                for i in range(0, 4):
                    index = Card.cardFromValueSuit(ranks[j], suits[i])
                    image = self.deck_inst.card(suits[i], ranks[j])
                    self.cardImages[index].draw_pixbuf(self.gc, image, 0, 0, 0, 0, -1, -1)

src/f/p/fpdb-grindi-HEAD/pyfpdb/Mucked.py   fpdb-grindi(Download)
        for j in range(0, 13):
            for i in range(0, 4):
                card_images[Card.cardFromValueSuit(ranks[j], suits[i])] = self.cropper(pb, i, j)
        temp_pb = gtk.gdk.Pixbuf(gtk.gdk.COLORSPACE_RGB, pb.get_has_alpha(), pb.get_bits_per_sample(),  30,  42)
#    also pick out a card back and store in [0]

src/f/p/fpdb-sql-HEAD/pyfpdb/Mucked.py   fpdb-sql(Download)
        for j in range(0, 13):
            for i in range(0, 4):
                card_images[Card.cardFromValueSuit(ranks[j], suits[i])] = self.cropper(pb, i, j)
        temp_pb = gtk.gdk.Pixbuf(gtk.gdk.COLORSPACE_RGB, pb.get_has_alpha(), pb.get_bits_per_sample(),  30,  42)
#    also pick out a card back and store in [0]