summaryrefslogtreecommitdiff
path: root/README.rst
diff options
context:
space:
mode:
authorjaseg <136313+jaseg@users.noreply.github.com>2021-03-19 10:47:25 +0100
committerGitHub <noreply@github.com>2021-03-19 10:47:25 +0100
commit03e847d8a1c83d0b29a96420095c31298c71cd45 (patch)
tree8efdc13d094778564d2bf40db8eaf08e5d9915e5 /README.rst
parent3105db35a493853866d5535fdba5939ef136123f (diff)
downloadpython-mpv-03e847d8a1c83d0b29a96420095c31298c71cd45.tar.gz
python-mpv-03e847d8a1c83d0b29a96420095c31298c71cd45.tar.bz2
python-mpv-03e847d8a1c83d0b29a96420095c31298c71cd45.zip
Update PyGObject example with locale fixup workaround
Closes #150
Diffstat (limited to 'README.rst')
-rw-r--r--README.rst5
1 files changed, 5 insertions, 0 deletions
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()