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/pytde-sampler/runner.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/pytde-sampler/runner.py')
-rwxr-xr-x | examples/pytde-sampler/runner.py | 19 |
1 files changed, 11 insertions, 8 deletions
diff --git a/examples/pytde-sampler/runner.py b/examples/pytde-sampler/runner.py index 8c6e8de..66056d7 100755 --- a/examples/pytde-sampler/runner.py +++ b/examples/pytde-sampler/runner.py @@ -3,13 +3,9 @@ """ import sys -from tdecore import TDEApplication, TDECmdLineArgs -from tdeui import TDEMainWindow from PyTQt.qt import TQVBoxLayout - -## relative import -- cry me a river! -import about - +from tdecore import TDEApplication, TDECmdLineArgs, TDEAboutData +from tdeui import TDEMainWindow class SamplerRunnerWindow(TDEMainWindow): def __init__(self, ctor): @@ -35,14 +31,21 @@ def importItem(name): names = name.split('.') modname, itemname = names[0:-1], names[-1] + print(str.join('.', modname)) mod = importName(str.join('.', modname)) return getattr(mod, itemname) if __name__ == '__main__': - options = [('+item', 'An item in the sys.path')] - TDECmdLineArgs.init(sys.argv, about.about) + description = b"A runner application" + version = b"1.0" + aboutData = TDEAboutData (b"", b"",\ + version, description, TDEAboutData.License_GPL,\ + b"(C) 2003 whoever the author is") + + options = [(b'+item', b'An item in the sys.path')] + TDECmdLineArgs.init(sys.argv, aboutData) TDECmdLineArgs.addCmdLineOptions(options) args = TDECmdLineArgs.parsedArgs() |