- %name(Init1)bool Init(const wxString& szName,
- const wxString& szShort = wxPyEmptyString,
- const wxString& szLocale = wxPyEmptyString,
- bool bLoadDefault = true,
- bool bConvertEncoding = false);
+ %extend {
+ bool Init1(const wxString& szName,
+ const wxString& szShort = wxPyEmptyString,
+ const wxString& szLocale = wxPyEmptyString,
+ bool bLoadDefault = true,
+ bool bConvertEncoding = false) {
+ bool rc = self->Init(szName, szShort, szLocale, bLoadDefault, bConvertEncoding);
+ // Python before 2.4 needs to have LC_NUMERIC set to "C" in order
+ // for the floating point conversions and such to work right.
+%#if PY_VERSION_HEX < 0x02040000
+ setlocale(LC_NUMERIC, "C");
+%#endif
+ return rc;
+ }
+
+ bool Init2(int language = wxLANGUAGE_DEFAULT,
+ int flags = wxLOCALE_LOAD_DEFAULT | wxLOCALE_CONV_ENCODING) {
+ bool rc = self->Init(language, flags);
+ // Python before 2.4 needs to have LC_NUMERIC set to "C" in order
+ // for the floating point conversions and such to work right.
+%#if PY_VERSION_HEX < 0x02040000
+ setlocale(LC_NUMERIC, "C");
+%#endif
+ return rc;
+ }
+ }