def startAppWithParam(self, param): l = logDir.logDir(str(param)) t = logWnd.logWnd(self, l.getLogFilePath()) t.startAppWithParam(param) cnt = 1 paN = str(param) if self.mD.has_key(paN): while self.mD.has_key(paN + '-' + str(cnt)): cnt +=1 paN = paN + '-' + str(cnt) self.mD[paN] = t self.tL[t] = self.icon.addMenuItem(paN)
def create_console_wnd_for_app(self, param): ''' Start an app with full path and parameters passed in a list param: [appFullPath, param1, param2, ...] ''' l = logDir.logDir(str(param)) t = logWnd.logWnd(self, l.getLogFilePath()) t.startAppWithParam(param) cnt = 1 app_path_and_param_gen_str = str(param) if self.app_name_to_task_dict.has_key(app_path_and_param_gen_str): while self.app_name_to_task_dict.has_key(app_path_and_param_gen_str + '-' + str(cnt)): cnt +=1 app_path_and_param_gen_str = app_path_and_param_gen_str + '-' + str(cnt) self.app_name_to_task_dict[app_path_and_param_gen_str] = t self.task_to_menu_item_dict[t] = self.icon.addMenuItem(app_path_and_param_gen_str)