def main(): aboutData = KAboutData( PACKAGE, PROGRAMNAME, VERSION, I18N_NOOP("LilyKDE servicemenu helper"), KAboutData.License_GPL, "Copyright (c) 2008, " + AUTHOR, "", HOMEPAGE) KCmdLineArgs.init (sys.argv, aboutData) KCmdLineArgs.addCmdLineOptions([ ("+files", I18N_NOOP("LilyPond files to convert")) ]) app = KApplication() log = LogWidget() app.setMainWidget(log) log.setMinimumHeight(240) log.setMinimumWidth(400) log.setCaption(PROGRAMNAME) log.show() # get the files to convert pa = KCmdLineArgs.parsedArgs() files = map(pa.arg, range(pa.count())) # start the first job. Itself takes care of running the rest. Job(files, log) app.exec_loop()