Ticket #2537: 0001-converting-from-locale-fraction_sep-before-parsing-2.patch

File 0001-converting-from-locale-fraction_sep-before-parsing-2.patch, 816 bytes (added by walter, 10 years ago)

replacing decimal_sep with '.'

  • calculate.py

    From 714185ecb80b01718aa25099c3c90abe2ab7b903 Mon Sep 17 00:00:00 2001
    From: Walter Bender <walter@walter-thinker.(none)>
    Date: Tue, 21 Dec 2010 16:47:45 -0500
    Subject: [PATCH] converting from locale fraction_sep before parsing (#2537)
    
    ---
     calculate.py |    1 +
     1 files changed, 1 insertions(+), 0 deletions(-)
    
    diff --git a/calculate.py b/calculate.py
    index bda756c..55fb254 100644
    a b class Calculate(ShareableActivity): 
    454454        s = unicode(self.text_entry.get_text())
    455455        label = unicode(self.label_entry.get_text())
    456456        _logger.debug('process(): parsing %r, label: %r', s, label)
     457        s = s.replace(self.ml.fraction_sep, '.')
    457458        try:
    458459            tree = self.parser.parse(s)
    459460            res = self.parser.evaluate(tree)