From dce9973befba3e9c5f44c2b92521c45162fca870 Mon Sep 17 00:00:00 2001 From: Walter Bender Date: Tue, 28 Sep 2010 21:25:58 +0000 Subject: more rigorous locale testing --- (limited to 'TurtleArt/tawindow.py') diff --git a/TurtleArt/tawindow.py b/TurtleArt/tawindow.py index 0b2b0e6..b8c6cac 100644 --- a/TurtleArt/tawindow.py +++ b/TurtleArt/tawindow.py @@ -80,7 +80,7 @@ class TurtleArtWindow(): timeout_tag = [0] def __init__(self, win, path, parent=None, mycolors=None, mynick=None): - self._loaded_project = "" + self._loaded_project = '' self.win = None self.parent = parent if type(win) == gtk.DrawingArea: @@ -119,14 +119,20 @@ class TurtleArtWindow(): self.height = gtk.gdk.screen_height() self.rect = gtk.gdk.Rectangle(0, 0, 0, 0) - self.keypress = "" + self.keypress = '' self.keyvalue = 0 - self.dead_key = "" + self.dead_key = '' self.mouse_flag = 0 self.mouse_x = 0 self.mouse_y = 0 + lang = os.environ['LANG'] + if lang != '' and lang is not None: + locale.setlocale(locale.LC_NUMERIC, lang) self.decimal_point = locale.localeconv()['decimal_point'] + if self.decimal_point == '' or self.decimal_point is None: + self.decimal_point = '.' + print self.decimal_point, os.environ['LANG'] self.orientation = HORIZONTAL_PALETTE if olpc_xo_1(): -- cgit v0.9.1