MCPcopy Create free account
hub / github.com/pyfa-org/Pyfa / OnInit

Method OnInit

gui/app.py:11–39  ·  view source on GitHub ↗

Do application initialization work, e.g. define application globals.

(self)

Source from the content-addressed store, hash-verified

9
10class PyfaApp(wx.App):
11 def OnInit(self):
12 """
13 Do application initialization work, e.g. define application globals.
14 """
15
16 # Name for my application.
17 self.appName = "pyfa"
18
19 #------------
20
21 # # Simplified init method.
22 # self.DoConfig()
23 # self.Init() # InspectionMixin
24 # # work around for Python stealing "_".
25 # sys.displayhook = _displayHook
26 #
27 # #------------
28
29
30 # Return locale folder.
31 localeDir = os.path.join(config.pyfaPath, "locale")
32
33 # Set language stuff and update to last used language.
34 self.locale = None
35 wx.Locale.AddCatalogLookupPathPrefix(localeDir)
36 # Set language stuff and update to last used language.
37 self.UpdateLanguage(config.language)
38
39 return True
40
41 #-----------------------------------------------------------------------
42

Callers

nothing calls this directly

Calls 1

UpdateLanguageMethod · 0.95

Tested by

no test coverage detected