From b81d9ec9ffdb93cf988e4f74c3f4680340ff184f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sl=C3=A1vek=20Banko?= Date: Mon, 16 Jan 2023 21:04:18 +0100 Subject: Drop python2 support. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Slávek Banko --- languages/python/app_templates/pyqt/app.py | 2 +- languages/python/app_templates/pyqt/pyqt-am-preproc.py | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'languages/python/app_templates/pyqt') diff --git a/languages/python/app_templates/pyqt/app.py b/languages/python/app_templates/pyqt/app.py index ede8dc54..d2207de3 100644 --- a/languages/python/app_templates/pyqt/app.py +++ b/languages/python/app_templates/pyqt/app.py @@ -133,7 +133,7 @@ class %{APPNAME}(QMainWindow): def slotOpenFile(self): fileName = str(QFileDialog.getOpenFileName("", "", self)) - print fileName + print(fileName) if not fileName=="": self.load(fileName) else: diff --git a/languages/python/app_templates/pyqt/pyqt-am-preproc.py b/languages/python/app_templates/pyqt/pyqt-am-preproc.py index ff7b5a16..b58f3328 100644 --- a/languages/python/app_templates/pyqt/pyqt-am-preproc.py +++ b/languages/python/app_templates/pyqt/pyqt-am-preproc.py @@ -7,7 +7,7 @@ # Test real_lines properly # Process Makefile.am's in sub-directories -from __future__ import generators + import sys import re @@ -49,13 +49,13 @@ for l in real_lines(mf): variables[lhs]=rhs # look for app sources -for (var,data) in variables.items(): +for (var,data) in list(variables.items()): spl = var.split("_",1) spl.append("") (prefix,primary) = (spl[0], spl[1]) if primary=="PROGRAMS": target=data - if variables.has_key(target + "_SOURCES"): + if target + "_SOURCES" in variables: sources = variables[target+"_SOURCES"].split() # change .ui into .py -- cgit v1.2.1