From 6be046642290c28c17949022fb66ae02ac21d544 Mon Sep 17 00:00:00 2001 From: aneejit1 Date: Tue, 19 Apr 2022 13:21:52 +0000 Subject: Updates to support Python version 3 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Amendments to the sip source and configuration/build scripts to allow for support under Python version 3. The examples have been updated using "2to3" along with some manual changes to sort out intentation and casting to integer from float. Signed-off-by: aneejit1 Signed-off-by: Slávek Banko --- examples3/checklists.py | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) (limited to 'examples3/checklists.py') diff --git a/examples3/checklists.py b/examples3/checklists.py index 44bc09f..61734ba 100755 --- a/examples3/checklists.py +++ b/examples3/checklists.py @@ -9,27 +9,27 @@ TRUE = 1 FALSE = 0 class CheckLists(TQWidget): - def __init__(self, *args): - apply( TQWidget.__init__, (self, ) + args ) + def __init__(self, *args): + TQWidget.__init__(* (self, ) + args ) - lay = TQHBoxLayout(self) - lay.setMargin(5) + lay = TQHBoxLayout(self) + lay.setMargin(5) - vbox1 = TQVBoxLayout(lay) - vbox1.setMargin(5) + vbox1 = TQVBoxLayout(lay) + vbox1.setMargin(5) - # First child: a Label - vbox1.addWidget(TQLabel("Check some items!", self)) + # First child: a Label + vbox1.addWidget(TQLabel("Check some items!", self)) - # Second child: the ListView - self.lv1 = TQListView(self) - vbox1.addWidget(self.lv1) - self.lv1.addColumn("Items") - self.lv1.setRootIsDecorated(TRUE) + # Second child: the ListView + self.lv1 = TQListView(self) + vbox1.addWidget(self.lv1) + self.lv1.addColumn("Items") + self.lv1.setRootIsDecorated(TRUE) - # create a list with 4 ListViewItems which will be parent items of other ListViewItems + # create a list with 4 ListViewItems which will be parent items of other ListViewItems - parentList = [] + parentList = [] parentList.append( TQListViewItem( self.lv1, "Parent Item 1" ) ) parentList.append( TQListViewItem( self.lv1, "Parent Item 2" ) ) @@ -91,7 +91,7 @@ class CheckLists(TQWidget): self.label = TQLabel( "No Item yet...", self ) tmp3.addWidget( self.label ) - def copy1to2(self): + def copy1to2(self): self.lv2.clear() # Insert first a controller Item into the second ListView. Always if Radio-ListViewItems -- cgit v1.2.3