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

All Samples(26)  |  Call(26)  |  Derive(0)  |  Import(0)

src/u/l/UlDunAd-HEAD/src/Texture.py   UlDunAd(Download)
def loadTexture(path = "", surface = pygame.Surface((1,1)), flip = True, fallback = None):
    if path.strip() is "":
        try:
            return textureCache.get(surface)
        except KeyError:
            textureCache.add(surface, Texture(path, surface, flip, fallback))
            print 'cache not used'
            return textureCache.get(surface)
    else:
        try:
            return textureCache.get(path)
        except KeyError:
            textureCache.add(path, Texture(path, surface, flip, fallback))