From 03e847d8a1c83d0b29a96420095c31298c71cd45 Mon Sep 17 00:00:00 2001 From: jaseg <136313+jaseg@users.noreply.github.com> Date: Fri, 19 Mar 2021 10:47:25 +0100 Subject: Update PyGObject example with locale fixup workaround Closes #150 --- README.rst | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/README.rst b/README.rst index 8522432..a6088af 100644 --- a/README.rst +++ b/README.rst @@ -321,6 +321,11 @@ PyGObject embedding if __name__ == '__main__': + # This is necessary since like Qt, Gtk stomps over the locale settings needed by libmpv. + # Like with Qt, this needs to happen after importing Gtk but before creating the first mpv.MPV instance. + import locale + locale.setlocale(locale.LC_NUMERIC, 'C') + application = MainClass() Gtk.main() -- cgit