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/tut12.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'examples3/tut12.py') diff --git a/examples3/tut12.py b/examples3/tut12.py index 7b13271..452d1ac 100755 --- a/examples3/tut12.py +++ b/examples3/tut12.py @@ -36,7 +36,7 @@ class LCDRange(qt.TQVBox): def setRange(self, minVal, maxVal): if minVal < 0 or maxVal > 99 or minVal > maxVal: - raise ValueError, "LCDRange.setRange(): invalid range" + raise ValueError("LCDRange.setRange(): invalid range") self.slider.setRange(minVal, maxVal) @@ -184,7 +184,7 @@ class CannonField(qt.TQWidget): y = y0 + vely * time - 0.5 * gravity * time * time r = qt.TQRect(0, 0, 6, 6) - r.moveCenter(qt.TQPoint(x, self.height() - 1 - y)) + r.moveCenter(qt.TQPoint(int(x), int(self.height() - 1 - y))) return r def targetRect(self): -- cgit v1.2.1