summaryrefslogtreecommitdiffstats
path: root/examples/pytde-sampler/runner.py
diff options
context:
space:
mode:
Diffstat (limited to 'examples/pytde-sampler/runner.py')
-rwxr-xr-xexamples/pytde-sampler/runner.py19
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()