def getpalette(self):

        self.load()
        try:
            return map(ord, self.im.getpalette())
        except ValueError:
            return None # no palette


    ##
    # Returns the pixel value at a given position.
    #
    # @param xy The coordinate, given as (x, y).
    # @return The pixel value.  If the image is a multi-layer image,
    #    this method returns a tuple.
Get palette contents.
dataset/ETHPy150Open kleientertainment/ds_mod_tools/pkg/win32/Python27/Lib/site-packages/PIL/Image.py/Image.getpalette