main.py 文件源码

python
阅读 18 收藏 0 点赞 0 评论 0

项目:wxpythoncookbookcode 作者: driscollis 项目源码 文件源码
def printSelectedCells(self, top_left, bottom_right):
        """
        Based on code from
        http://ginstrom.com/scribbles/2008/09/07/getting-the-selected-cells-from-a-wxpython-grid/
        """
        cells = []

        rows_start = top_left[0]
        rows_end = bottom_right[0]

        cols_start = top_left[1]
        cols_end = bottom_right[1]

        rows = range(rows_start, rows_end+1)
        cols = range(cols_start, cols_end+1)

        cells.extend([(row, col)
                      for row in rows
                      for col in cols])

        print("You selected the following cells: ", cells)

        for cell in cells:
            row, col = cell
            print(self.myGrid.GetCellValue(row, col))
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号