X-Git-Url: http://www.iramuteq.org/git?a=blobdiff_plain;f=sheet.py;h=f72ca54763204e869e03d7cb3c490bdbafcddee3;hb=refs%2Fheads%2F3.0;hp=c4fbd698bf8e821d96345c70336bd689d474b63f;hpb=8fa853a25a9d62b1446e1bc543e5a3a4d0e03dcf;p=iramuteq diff --git a/sheet.py b/sheet.py index c4fbd69..f72ca54 100644 --- a/sheet.py +++ b/sheet.py @@ -1,15 +1,19 @@ -#!/bin/env python # -*- coding: utf-8 -*- #Author: Pierre Ratinaud -#Copyright (c) 2008-2009 Pierre Ratinaud -#Lisense: GNU/GPL - +#Copyright (c) 2008-2020 Pierre Ratinaud +#modification pour python 3 : Laurent Mérat, 6x7 - mai 2020 +#License: GNU/GPL +#------------------------------------ +# import des modules wx +#------------------------------------ from wx.lib import sheet -import wx + +# utilisé seulement dans layout.py class MySheet(sheet.CSheet): + def __init__(self, parent): sheet.CSheet.__init__(self, parent) self.parent=parent @@ -21,15 +25,10 @@ class MySheet(sheet.CSheet): event.Skip() def Populate(self,content): - c=0 - for r in content: - c+=1 nrow=len(content) - print 'nrow', nrow self.SetNumberRows(nrow) ncol=len(content[1]) - print 'ncol',ncol self.SetNumberCols(ncol) for y in range(0,nrow): for i in range(0,ncol): - self.SetCellValue(y,i,str(content[y][i])) \ No newline at end of file + self.SetCellValue(y,i,str(content[y][i]))