diff options
author | Michele Calgaro <michele.calgaro@yahoo.it> | 2023-01-03 15:29:41 +0900 |
---|---|---|
committer | Michele Calgaro <michele.calgaro@yahoo.it> | 2023-01-07 22:14:56 +0900 |
commit | 4ce11cc30df1805459a615960fdec204a975548a (patch) | |
tree | 084f1e1fa404bdf0d082b1a58acf392b5d177326 /examples/uimodules | |
parent | 065f41b4908b11278d4334e8c85150ec0fd4a9f6 (diff) | |
download | pytde-4ce11cc30df1805459a615960fdec204a975548a.tar.gz pytde-4ce11cc30df1805459a615960fdec204a975548a.zip |
Drop python2 support.
Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
Diffstat (limited to 'examples/uimodules')
-rw-r--r-- | examples/uimodules/uidialogs.py | 21 | ||||
-rw-r--r-- | examples/uimodules/uimenus.py | 6 | ||||
-rw-r--r-- | examples/uimodules/uimisc.py | 6 | ||||
-rw-r--r-- | examples/uimodules/uiwidgets.py | 16 |
4 files changed, 20 insertions, 29 deletions
diff --git a/examples/uimodules/uidialogs.py b/examples/uimodules/uidialogs.py index 12ad10f..697deb8 100644 --- a/examples/uimodules/uidialogs.py +++ b/examples/uimodules/uidialogs.py @@ -16,11 +16,6 @@ Information = 4 Sorry = 5 Error = 6 -# Python 2.2.2 supplies these, but they're duplicated here -# for backward compatibility -False = 0 -True = 1 - class CustomDlg (KDialog): def __init__ (self, parent, name = "custom dlg", modal = False): KDialog.__init__ (self, parent, name, modal) @@ -127,10 +122,10 @@ class MessageDlg (KDialog): def dlgTDEAboutDialog (parent): dlg = TDEAboutDialog (parent, 'about dialog', False) dlg.setLogo (TQPixmap ("pytestimage.png")) - dlg.setTitle ("UISampler for PyKDE") + dlg.setTitle ("UISampler for PyTDE") dlg.setAuthor ("Jim Bublitz", "jbublitz@nwinternet.com", "http://www.riverbankcomputing.co.uk",\ - "\n\nPyKDE -- Python bindings\n\tfor KDE") - dlg.addContributor ("PyKDE list", "pytde@mats.gmd.de", TQString.null, TQString.null) + "\n\nPyTDE -- Python bindings\n\tfor TDE") + dlg.addContributor ("PyTDE list", "pytde@mats.gmd.de", TQString.null, TQString.null) dlg.show () @@ -189,8 +184,8 @@ def dlgKKeyDialog (parent): def dlgKLineEditDlg (parent): result, ok = KLineEditDlg.getText ("Enter text", "<Your input here>", parent) - print "result", result - print "ok", ok + print("result", result) + print("ok", ok) # pop up another dlg to show what happened in the KLineEditDlg if ok: @@ -227,6 +222,6 @@ def dlgKWizard (parent): wiz.show () if __name__ == "__main__": - print - print "Please run uisampler.py" - print
\ No newline at end of file + print() + print("Please run uisampler.py") + print() diff --git a/examples/uimodules/uimenus.py b/examples/uimodules/uimenus.py index bec0c0f..025663a 100644 --- a/examples/uimodules/uimenus.py +++ b/examples/uimodules/uimenus.py @@ -103,6 +103,6 @@ def menuKWindowListMenu (parent): if __name__ == "__main__": - print - print "Please run uisampler.py" - print
\ No newline at end of file + print() + print("Please run uisampler.py") + print() diff --git a/examples/uimodules/uimisc.py b/examples/uimodules/uimisc.py index c922fb1..4536092 100644 --- a/examples/uimodules/uimisc.py +++ b/examples/uimodules/uimisc.py @@ -234,6 +234,6 @@ def miscQXEmbed (parent): parent.currentPageObj = PageNotImpl (parent) if __name__ == "__main__": - print - print "Please run uisampler.py" - print
\ No newline at end of file + print() + print("Please run uisampler.py") + print() diff --git a/examples/uimodules/uiwidgets.py b/examples/uimodules/uiwidgets.py index 790f855..106a559 100644 --- a/examples/uimodules/uiwidgets.py +++ b/examples/uimodules/uiwidgets.py @@ -1,7 +1,7 @@ import time, sys -from PyTQt.qt import TQLabel, TQFrame, TQColor, TQPushButton, SIGNAL, TQButtonGroup, TQRadioButton, TQt, TQString, TQChar,\ - TQWidget, TQTimer +from PyTQt.qt import TQLabel, TQFrame, TQColor, TQPushButton, SIGNAL, TQButtonGroup, TQRadioButton, \ + TQt, TQString, TQChar, TQWidget, TQTimer from tdecore import TDEApplication from tdeui import KEdit, KComboBox, KColorCombo, KEditListBox, TDEListBox, KLineEdit, KRestrictedLine,\ @@ -12,10 +12,6 @@ from tdeui import KEdit, KComboBox, KColorCombo, KEditListBox, TDEListBox, KLine KIntNumInput, KDoubleNumInput, KPasswordEdit, KURLLabel, KPaletteTable,\ KSeparator -if sys.version [:6] < "2.2.2": - False = 0 - True = 1 - class Page1: def __init__ (self, parent): self.page = parent.addPage () @@ -350,7 +346,7 @@ class Page5: urlLbl.setGeometry (x, y, 100, 20) urlLbl.show () - url = KURLLabel ("http://riverbankcomputing.co.uk", "PyKDE", self.page) + url = KURLLabel ("http://riverbankcomputing.co.uk", "PyTDE", self.page) url.setGeometry (x, y + 20, 100, 20) url.setUseTips (True) url.setTipText ("http://riverbankcomputing.co.uk") @@ -749,6 +745,6 @@ def widKURLLabel (parent): if __name__ == "__main__": - print - print "Please run uisampler.py" - print
\ No newline at end of file + print() + print("Please run uisampler.py") + print() |