diff options
author | jaseg <136313+jaseg@users.noreply.github.com> | 2021-03-19 10:47:25 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-03-19 10:47:25 +0100 |
commit | 03e847d8a1c83d0b29a96420095c31298c71cd45 (patch) | |
tree | 8efdc13d094778564d2bf40db8eaf08e5d9915e5 | |
parent | 3105db35a493853866d5535fdba5939ef136123f (diff) | |
download | python-mpv-03e847d8a1c83d0b29a96420095c31298c71cd45.tar.gz python-mpv-03e847d8a1c83d0b29a96420095c31298c71cd45.tar.bz2 python-mpv-03e847d8a1c83d0b29a96420095c31298c71cd45.zip |
Update PyGObject example with locale fixup workaround
Closes #150
-rw-r--r-- | README.rst | 5 |
1 files changed, 5 insertions, 0 deletions
@@ -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() |