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/mimetype.py | |
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/mimetype.py')
-rw-r--r-- | examples/mimetype.py | 18 |
1 files changed, 8 insertions, 10 deletions
diff --git a/examples/mimetype.py b/examples/mimetype.py index 044bc7a..26fbe7f 100644 --- a/examples/mimetype.py +++ b/examples/mimetype.py @@ -4,8 +4,6 @@ methods (KMimeType, KService, etc). It generally tests the *::List methods for these classes (eg KService::List) since that also tests the *::Ptr mapped type code (eg KService::Ptr) at the same time. -This version is suitable for KDE >= 3.0.0 (some methods not available -in earlier versions) """ """ @@ -47,7 +45,7 @@ from tdeio import KMimeType, KService, KServiceGroup, KServiceType, TDETrader, K class MainWin (TDEMainWindow): def __init__ (self, *args): - apply (TDEMainWindow.__init__, (self,) + args) + TDEMainWindow.__init__(*(self,) + args) tabctl = KTabCtl (self) self.setGeometry (0, 0, 600, 400) @@ -88,7 +86,7 @@ class OfferListTab (TQWidget): trader = TDETrader.self () slist = trader.query ("image/jpeg", "Type == 'Application'") - print "TDETrader returned:", slist + print("TDETrader returned:", slist) for s in slist: lvi = TQListViewItem (lv, s.type_ (), s.name (), s.exec_ (), s.library ()) @@ -253,16 +251,16 @@ class KMimeTypeTab (TQWidget): #-------------------- main ------------------------------------------------ -description = "Test/demo TDESharedPtr related methods/classes" -version = "1.0" -aboutData = TDEAboutData ("", "",\ + +description = b"Test/demo TDESharedPtr related methods/classes" +version = b"1.0" +aboutData = TDEAboutData (b"MyApp", b"MyApp",\ version, description, TDEAboutData.License_GPL,\ - "(C) 2003 Jim Bublitz") + b"(C) 2003 Jim Bublitz") TDECmdLineArgs.init (sys.argv, aboutData) -TDECmdLineArgs.addCmdLineOptions ([("+files", "File to open")]) - +TDECmdLineArgs.addCmdLineOptions ([(b"+files", b"File to open")]) app = TDEApplication () mainWindow = MainWin (None, "main window") mainWindow.show() |