Fix Tk crash on locales with non-'.' decimal separator #387

Merged
merged 1 commit into from Jul 2, 2011

Projects

None yet

3 participants

@mdboom
Member
mdboom commented Jun 30, 2011

Pass ints rather than floats to Tkinter when it expects it. Failure to do so causes exceptions on locales with a non-'.' as a decimal separator. Reported by Hans Bering.

See e-mail thread ""bad screen distance" tkinter error with German locale"

@mdboom mdboom Pass ints rather than floats to Tkinter when it expects it. Failure t…
…o do so causes exceptions on locales with a non-'.' as a decimal separator. Reported by Hans Bering.
3783416
@efiring efiring merged commit 5f852e4 into matplotlib:v1.0.x-maint Jul 2, 2011
@cgohlke
Contributor

Line 188 also needs to be fixed.

self._tkcanvas.create_image(w/2, h/2, image=self._tkphoto)

https://github.com/matplotlib/matplotlib/blob/master/lib/matplotlib/backends/backend_tkagg.py#L188

@mdboom mdboom deleted the mdboom:tk-locale-crash branch Mar 3, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment