def on_text(self, text):
        if text != 's': return pyglet.window.event.EVENT_UNHANDLED
        image = pyglet.image.BufferImage().get_raw_image()
        fn = filename + '.png'
        n = 1
        while os.path.exists(fn):
            fn = filename + str(n) + '.png'
            n += 1
        print fn%"Saving to '%s'"
        image.save(fn)
dataset/ETHPy150Open ardekantur/pyglet/tools/genmap.py/SaveHandler.on_text/swapped operands of `%`