Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/python/364.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Python 列出画廊名单_Python_Image_Pygame - Fatal编程技术网

Python 列出画廊名单

Python 列出画廊名单,python,image,pygame,Python,Image,Pygame,我正在尝试创建一个图像库列表,可以使用右/左箭头键进行翻转。一旦我选择了一个画廊,我会使用向上和向下箭头来翻转所选画廊的图像 这就是我在使用数字键选择要翻阅其图像的库之前停止的位置 在主循环中,更改gallery\u索引后,您永远不会对其执行任何操作 我猜你想做点什么 ... gallery_index %= len(SG) # switch the gallery gallery = SG[gallery_index] # K

我正在尝试创建一个图像库列表,可以使用右/左箭头键进行翻转。一旦我选择了一个画廊,我会使用向上和向下箭头来翻转所选画廊的图像

这就是我在使用数字键选择要翻阅其图像的库之前停止的位置


在主循环中,更改
gallery\u索引后,您永远不会对其执行任何操作

我猜你想做点什么

...
        gallery_index %= len(SG)

        # switch the gallery
        gallery = SG[gallery_index]

        # Keep the index in the valid range.
        image_index %= len(gallery)
        # Switch the image.
        image = gallery[image_index]
...

在主循环中,更改
gallery\u索引后,您永远不会对其执行任何操作

我猜你想做点什么

...
        gallery_index %= len(SG)

        # switch the gallery
        gallery = SG[gallery_index]

        # Keep the index in the valid range.
        image_index %= len(gallery)
        # Switch the image.
        image = gallery[image_index]
...

为什么在SG中使用左右键不翻转库?为什么在SG中使用左右键不翻转库?