def OnInit(self): self._fullConfigPath = getConfigPath () Application.init(self._fullConfigPath) # Если программа запускается в виде exe-шника, то перенаправить вывод ошибок в лог exepath = unicode (sys.argv[0], getOS().filesEncoding) if exepath.endswith (u".exe"): # Закоментировать следующую строку, если не надо выводить strout/strerr в лог-файл self.RedirectStdio (self.getLogFileName (self._fullConfigPath)) pass from outwiker.gui.mainwindow import MainWindow wx.InitAllImageHandlers() self.mainWnd = MainWindow(None, -1, "") self.SetTopWindow (self.mainWnd) Application.mainWindow = self.mainWnd Application.actionController = ActionController (self.mainWnd, Application.config) registerActions(Application) self.mainWnd.createGui() Application.plugins.load (getPluginsDirList()) self.bindActivateApp() self.Bind (wx.EVT_QUERY_END_SESSION, self._onEndSession) starter = Starter() starter.process() return True